summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-07-17 15:37:59 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-07-17 15:37:59 +0000
commit18ec88febe9af1a8fd8bc7fd30198cac425b08bb (patch)
tree0024ef603899e8c6a6e79408b15bad5b983adfc6 /sys/arch
parent0775f2f1858827d4faf1a9b34de8f074e079c024 (diff)
Consistently use SEL_RPL as the mask when testing selector privilege level
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/locore.S4
-rw-r--r--sys/arch/amd64/amd64/vector.S4
-rw-r--r--sys/arch/amd64/include/frameasm.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S
index df4cea82082..46f20f7d6e3 100644
--- a/sys/arch/amd64/amd64/locore.S
+++ b/sys/arch/amd64/amd64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.71 2015/07/17 06:13:44 mlarkin Exp $ */
+/* $OpenBSD: locore.S,v 1.72 2015/07/17 15:37:58 guenther Exp $ */
/* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */
/*
@@ -1128,7 +1128,7 @@ NENTRY(intr_fast_exit)
movq TF_RBP(%rsp),%rbp
movq TF_RBX(%rsp),%rbx
- testq $SEL_UPL,TF_CS(%rsp)
+ testq $SEL_RPL,TF_CS(%rsp)
je 5f
INTR_RESTORE_SELECTORS
diff --git a/sys/arch/amd64/amd64/vector.S b/sys/arch/amd64/amd64/vector.S
index 486495c2cd1..3d752abfc1e 100644
--- a/sys/arch/amd64/amd64/vector.S
+++ b/sys/arch/amd64/amd64/vector.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: vector.S,v 1.42 2015/07/16 05:10:14 guenther Exp $ */
+/* $OpenBSD: vector.S,v 1.43 2015/07/17 15:37:58 guenther Exp $ */
/* $NetBSD: vector.S,v 1.5 2004/06/28 09:13:11 fvdl Exp $ */
/*
@@ -153,7 +153,7 @@ IDTVEC(trap0d)
leaq _C_LABEL(doreti_iret)(%rip),%rdi
cmpq %rdi,TF_RIP(%rsp)
je 1f
- testq $SEL_UPL,TF_CS(%rsp)
+ testq $SEL_RPL,TF_CS(%rsp)
jz 2f
1: swapgs
2: movq %r15,TF_R15(%rsp)
diff --git a/sys/arch/amd64/include/frameasm.h b/sys/arch/amd64/include/frameasm.h
index b06d1bffb35..b3ec74e7365 100644
--- a/sys/arch/amd64/include/frameasm.h
+++ b/sys/arch/amd64/include/frameasm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frameasm.h,v 1.8 2015/05/18 19:59:27 guenther Exp $ */
+/* $OpenBSD: frameasm.h,v 1.9 2015/07/17 15:37:58 guenther Exp $ */
/* $NetBSD: frameasm.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
#ifndef _AMD64_MACHINE_FRAMEASM_H
@@ -32,7 +32,7 @@
#define INTRENTRY \
subq $32,%rsp ; \
- testq $SEL_UPL,56(%rsp) ; \
+ testq $SEL_RPL,56(%rsp) ; \
je 98f ; \
swapgs ; \
98: INTR_SAVE_GPRS