mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
Kernel: Clear ESI and EDI on syscall entry
Since these are not part of the system call convention, we don't care what userspace had in there. Might as well scrub it before entering the kernel. I would scrub EBP too, but that breaks the comfy kernel-thru-userspace stack traces we currently get. It can be done with some effort.
This commit is contained in:
parent
3f52cee595
commit
e576c9e952
Notes:
sideshowbarker
2024-07-19 09:50:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e576c9e952f
1 changed files with 2 additions and 0 deletions
|
@ -48,6 +48,8 @@ asm(
|
|||
" mov %ax, %ds\n"
|
||||
" mov %ax, %es\n"
|
||||
" cld\n"
|
||||
" xor %esi, %esi\n"
|
||||
" xor %edi, %edi\n"
|
||||
" call syscall_handler\n"
|
||||
" add $0x4, %esp\n"
|
||||
" popl %gs\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue