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
commit b285a1944e
Notes: sideshowbarker 2024-07-19 11:17:53 +09:00
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"