News for hackers. Stuff that matters.
Re:Hotpatching a C Function on x86 by reubenmorais on Friday April 01, 2016 @08:47PM (#11409640)
I mentioned this in another comment, but you don't need the ms_hook_prologue attribute, it's just helpful.
Re:Hotpatching a C Function on x86 by dkopi on Saturday April 02, 2016 @03:49AM (#11410670)
True, you don't usually need the prologue to hook a function, but we're talking about hooking functions that might be called by another thread at the same time. If you just modify the instructions while another thread is running the code, you might crash and burn. The prologue helps by ensuring the first 8 bytes of a function are just a large NOP.