1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:38:12 +00:00

Kernel: Clear the x86 DF flag when entering the kernel

The SysV ABI says that the DF flag should be clear on function entry.
That means we have to clear it when jumping into the kernel from some
random userspace context.
This commit is contained in:
Andreas Kling 2019-11-09 22:40:35 +01:00
parent fbeb1ab15b
commit b285a1944e
3 changed files with 33 additions and 28 deletions

View file

@ -24,6 +24,7 @@ asm(
" popw %es\n"
" popw %fs\n"
" popw %gs\n"
" cld\n"
" call syscall_trap_entry\n"
" popw %gs\n"
" popw %gs\n"