summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2018-02-28 06:19:29 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2018-02-28 06:19:29 +0000
commitdb610d87ffcd06a23b14ddfef5b3b1bcce315bee (patch)
treeed43f5720cb1fd3e657c5d6ba6047be36394e3a8 /sys
parent3dc30a2d46a31342c8c0cd040dcd64f942a09f47 (diff)
It helps to spell 'GSBASE' with a 'G'. With the thinko the NMI and
double-fault handlers only worked when the GS.base was already the kernel value (i.e., from inside the kernel). Retested in qemu for both positive and negative cases ("if I put a bogus GS.base value there, does it crash on NMI?")
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/vector.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/vector.S b/sys/arch/amd64/amd64/vector.S
index 5de23fe67ab..5d75cf92e89 100644
--- a/sys/arch/amd64/amd64/vector.S
+++ b/sys/arch/amd64/amd64/vector.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: vector.S,v 1.52 2018/02/21 19:24:15 guenther Exp $ */
+/* $OpenBSD: vector.S,v 1.53 2018/02/28 06:19:28 guenther Exp $ */
/* $NetBSD: vector.S,v 1.5 2004/06/28 09:13:11 fvdl Exp $ */
/*
@@ -124,7 +124,7 @@ IDTVEC(trap02)
pushq $T_NMI
calltrap_specstk: # special stack path
INTR_REENTRY
- movl $MSR_FSBASE,%ecx # save current GS.base...
+ movl $MSR_GSBASE,%ecx # save current GS.base...
rdmsr
movq %rax,%r12 # ...in %r12 and %r13
movq %rdx,%r13
@@ -145,7 +145,7 @@ INTRENTRY_LABEL(calltrap_specstk):
SMAP_CLAC
movq %rsp,%rdi
call trap
- movl $MSR_FSBASE,%ecx # restore GS.base
+ movl $MSR_GSBASE,%ecx # restore GS.base
movq %r12,%rax
movq %r13,%rdx
wrmsr