kernel - Clean up direction flag on syscall entry
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 17 May 2019 01:43:20 +0000 (18:43 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 17 May 2019 01:43:20 +0000 (18:43 -0700)
* Make sure the direction flag is clear on syscall entry.  Don't
  trust userland.

sys/platform/pc64/x86_64/exception.S

index 395c8f8..e3f4774 100644 (file)
@@ -443,7 +443,7 @@ IDTVEC(fast_syscall)
        movq    %rax,%r13
        movq    %rax,%r14
        movq    %rax,%r15
-
+       cld
        sti
        FAKE_MCOUNT(TF_RIP(%rsp))
        movq    %rsp, %rdi