News for hackers. Stuff that matters.
Re:Why do Windows functions all begin with a pointless MOV E... by to3m on Wednesday September 21, 2011 @12:09PM (#3022518)
Having a hot-patch point avoids race conditions when overwriting the code. The patch target needs to be 1 instruction, so that any OS threads executing that code either see the old instruction (and run the unpatched code), or the new instruction (and run patched code), and never some mishmash of pre-patch and post-patch instructions.

(It also needs to be possible to overwrite the patch target with 1 instruction, which isn't possible for a far JMP as they are 5 bytes in length.)

There are no comments on this comment yet.