Slashdot Mirror


User: EkriirkE

EkriirkE's activity in the archive.

Stories
0
Comments
605
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 605

  1. Re:Who uses that anyway ? on GCC 4.3.0 Exposes a Kernel Bug · · Score: 1

    I can't think of too much for reverse scanning other than to, say, separate a filename from the directory, it's faster to just go backwards from the known length than to go forward and keep record of each path break encountered and take the last occurrence...

  2. Re:EVERYBODY PANIC!!! on GCC 4.3.0 Exposes a Kernel Bug · · Score: 1

    MS Windows uses REP MOVSD and a topoff with REP MOVSB in its internal string memory copy (RtlCopyMemory/RtlMoveMemory), as does the MSVCRT... And I do as well :)
    When Windows has to backwards copy on overlap it does STD then immediately CLD after the REP operation, and also ensures the CLD on a forward copy. MSVCRT does not ensure it on the forward copy.

  3. One more thing. on GCC 4.3.0 Exposes a Kernel Bug · · Score: 1

    This is assuming the flag is unmodified from the kernel call, saying the string function is called or entered from the kernel. But if the string functions get called mid-code and the flag is changed be some other function, say a memmove that has an overlapping source and destination, the direction flag is set (STD) and the memory copied backwards end-to-start to prevent the beginning being copied over and over by the overlap.
    Does GCC's memmove clear the flag (CLD)?
    What if someone writes some custom inline assembly with a STD and no CLD (yes, this does violate asm practice - flipping a flag and not resetting it when done) then a string function sometime after that during the same procedure? GCC will fail.
    GCC should not rely on the kernel to have the flags in a particular state upon entry, as the functions will not always be called immediately.

  4. Re:EVERYBODY PANIC!!! on GCC 4.3.0 Exposes a Kernel Bug · · Score: 2, Informative
    Oops, source memory was supposed to be (better aligned, too):

    Address: 0123456789ABCDEFGHIJKLMNOPQRSTUV
    Content: XXX-!@#$A car is heavy.-XXXXXXXX
  5. Re:EVERYBODY PANIC!!! on GCC 4.3.0 Exposes a Kernel Bug · · Score: 5, Informative
    In x86 (assumed from here on) assembly, there are some 'quick' operations to read, write, and test memory (LODS*, STOS*, SCAS* respectively - there are probably more). The CPU has registers, or variables that are counters, or hold the memory addresses in question - in these cases a source memory position and a destination memory position. When you performs these commands the memory registers either increment or decrement value (position) depending on how the direction flag is set. GCC is assuming the flag is clear and the pointers will increment - go forward after each call. If the direction flag is set incorrectly upon calling these string or memory functions, the pointers could go backwards and thus copy (or scan) the wrong chunk of memory to the wrong destination.

    Say our source memory contains:

    Address: 0123456789ABCDEFGHIJKLMNOPQRSTUV
    Contents: XXXXXXXXA car is heavy.-XXXXXXXX


    Let's pretend the hyphen is a null (the string terminator or "stop" in most languages and OS) If I want to perform a strlen on that string at position '8', it should return 15 characters because it found the null at 'N' If the direction flag is wrong, it will not scan 8, 9, A, ... but 8, 7, 6, ... until it finally finds that null or crashes with an access violation.

    And with memory, I want to copy 5 bytes from '8' to position 'P' If that works correctly, we get this in memory:

    Address: 0123456789ABCDEFGHIJKLMNOPQRSTUV
    Contents: XXX-!@#$A car is heavy.-XA carXX


    However, if the direction is wrong, we will get:

    Address: 0123456789ABCDEFGHIJKLMNOPQRSTUV
    Contents: XXX-!@#$A car is heav!@#$AXXXXXX


    See how '8' copied to 'P' as expected, but decrementing we then get '7' to 'O', etc

    We now have corrupt memory. If we so a strlen, strcat or other null-expecting function on that string located at '8' we will see garbage where the memory copy wrote the wrong data to the wrong position. For the nitpicks, this example used per-byte, there are 16, 32, 64 bit variants of the functions that would cause similar problems bit in 2, 4, 8 byte chunks.
  6. Re:EVERYBODY PANIC!!! on GCC 4.3.0 Exposes a Kernel Bug · · Score: 5, Informative

    When scanning strings for, say, a null terminator the direction flag determines if the current memory register gets incremented or decremented after each byte check. It could mean strlen returns 0 if your strings are grouped together in a segment of memory, or it just plain return the wrong result. Also memory copy routines could copy the wrong part of memory to the wrong place and overwrite executable code (or just cause a page/segment fault).

  7. Re:Yep, on GCC 4.3.0 Exposes a Kernel Bug · · Score: 2, Funny

    Some CLD will clear that STD, silly!

  8. Yep, on GCC 4.3.0 Exposes a Kernel Bug · · Score: 5, Funny

    That's what happens when you don't clear that STD...

  9. Re:Criminal prosecution? on Cracking a Crypto Hard Drive Case · · Score: 1

    *WHOOSH*

  10. Re:Move along, nothing to see here... on The $54 Million Laptop · · Score: 1

    So if you bring your $2,000 civic into a shop with $100,000 rice mods and they total it, incinerating it thus making it disappear, in a drunken joy ride, you are only entitled to the $2,000? Oh.

  11. Re:Move along, nothing to see here... on The $54 Million Laptop · · Score: 1

    You forgot software and photos/media she had. Plus inconvenience fees, plus the identity theft protection fees (a good point). Whether or not she had personally identifiable/exploitable info on there is none the matter. Its a very very plausible truth until otherwise proven... which obviously can't.

  12. Re:WOW! on Femtosecond Lasers Used To Color Metals · · Score: 1

    The article states the iridescent property of the color is cause by nano-features, yet the color is strengthening by pigment. The slits are still reflecting blue in themselves; if the scales reflected white, you'd probably see white with a hint of blue shininess.

  13. Great idea! on Bluetooth Prosthetics Help US Marine To Walk Again · · Score: 1

    Let's sterilize him with unnecessary microwave RF, and use more batteries just so there won't be a couple wires!

  14. Re:I sure hope... on Sun Buys MySQL · · Score: 1

    *Whoosh!*

  15. I sure hope... on Sun Buys MySQL · · Score: 3, Funny

    ...that they don't make start migrating it to Java technologies. I want a FAST database.

  16. Re:Don't forget embedded! on Y2K38 Watch Starts Saturday · · Score: 1

    By that logic, computers were doomed to negate by January 1, 1970 00:00:02 However, if they had used signed 8-bit time, they could have saved the computer industry until a whole lot of worry until January 1, 1970 00:00:04

  17. Re:Aww... on VBA Going Away, Macs Now, PCs Soon · · Score: 1

    Yeah, and even if they actually set a policy preventing regedit from loading, I could call system apis in VBA and wrote my own reg edit in word.

  18. If it is encrypted it must be decrypted at a point on Is Copy Protection Needed or Futile? · · Score: 1

    And if it is decrypted at any point, as it must be for you use, it can be saved in that state - or at least captured.

  19. MacSE with... on What Was Your First Gaming Experience? · · Score: 1

    Lode Runner, Birds, Tank!s, Hot Air Balloon, Wheel of Fortune, etc on Mac OS6. I managed to hook up to its serial port and apple-talk the filesystem to my PC where I can now emulate it in vMac, even with all my old homework from elementary school on it. I still have the machine in its original carrying case in the closet where the 20MB drive can rot in peace. I also have an Apple IIc with an onslaught of games that was there alongside the SE back in the day. I've successfully copied disk images from my PC to it to complete the collection, but not having success copying number munchers/o'dell lake back :(

  20. Oh, hello again. on SimCity Source Code Is Now Open · · Score: 1
  21. Cool. on The History of the Vectrex · · Score: 1

    I still have this sitting on my dresser. The only games i have for it though are the build in Starfield and a Scramble cart. I have the color masks, too. I once saw some more carts at a goodwill, but when I came back with money they were gone :(

  22. Great. on Electricity Over Glass · · Score: 1

    So they are going to use a higher energy source to power a very low energy device (great power loss due to light absorption/loss within the optic cable, and the inefficiencies of photovoltaics today) swimming in fuel. This (light) energy will still be converted to electricity in the sensor, but now with less electrical fault detection.

  23. Milticore/parallel != Faster on Faster Chips Are Leaving Programmers in Their Dust · · Score: 1

    Multicore just means more apps/threads can run in a multitasking environment without impacting each other. The title is misleading. Though the article is true to the point of not many programmers program for parallel processing, not all applications can make use of such.

  24. Conservation of Energy on Monitor Draws Zero Power In Standby · · Score: 1

    The energy used to charge said capacitor(s) had to come from somewhere, not even stopping to mention internal resistance... Better low power-consuming technology, sure, but the caps are a gimmick.

  25. Re:Nifty. on Asus Insider Claims Apple Tablet Is Real · · Score: 1

    My past 2 laptops have been convertible tablets, granted most of their time is/was spent in laptop mode. Tablet mode is great for some games, like Warcraft (II). And when in cramped spaces like when on a road trip or in an airplane, it's really nice as positions where you can situate the screen at a readable angle are impossible w/o a bulkhead seat (though I'm far from being a midget).