A free Windows-compatible Operating System - mirrored from GitHub
Find a file
Timo Kreuzer df7e3fde89 [NTOSKRNL]
When a user mode debugger has single stepping enabled and steps over a sysenter instruction, you are obviously not supposed to enter the kernel debugger on the syscall entry handler. But exactly this happened on reactos. This was because the sysenter instruction doesn't disable single stepping, so we need to handle this special case manually in the single stepping handler (which we didn't). We now check if the single step comes from KiFastCallEntry and when it does, disable single stepping in the current (nested) trap frame and return back to a secondary fast call entry. The 2nd entrypoint will make sure to re-enable the single step flag in EFLAGS before returning to usermode.
To make this actually work, the asm entry stub itself needs to handle saving of eflags, so some trap frame modification from KiFastCallEntryHandler was moved into the asm stub. Since the amount of asm instructions is rather small (10 instructions, pretty straight forward) I moved everything from KiSystemServiceHandler to the asm stub and killed KiFastCallEntryHandler entirely, calling KiSystemServiceHandler instead.
Now stepping over a sysenter instruction works with OllyDbg without breaking into the kernel debugger. CORE-8057 #resolve

svn path=/trunk/; revision=63420
2014-05-22 22:28:57 +00:00
reactos [NTOSKRNL] 2014-05-22 22:28:57 +00:00
rosapps [GREEN]: Fix 2nd parameter of ObOpenObjectByName. 2014-05-17 13:26:32 +00:00
rostests [MSVCRT_CRT_APITEST] 2014-05-21 14:26:20 +00:00
wallpaper - Add CMakeLists for wallpaper 2012-02-05 13:43:04 +00:00