diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-04-17 00:04:00 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-04-17 00:04:00 +0000 |
commit | 7e7bf07045cb0a303f34d3dec56d0bbf21b671e7 (patch) | |
tree | c47400cd7ac0bfa0442e73839d123b4675d82f84 | |
parent | 138836e1d4e1f43b7a160e30365b45440e2923d3 (diff) |
IDTVEC_NOALIGN() was the incorrect way to create a label in two places,
use GENTRY() instead. Also add two endbr64 which cannot be supplied by
macros
ok guenther
-rw-r--r-- | sys/arch/amd64/amd64/locore.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S index 50e6f07ca37..cbdaccb65fe 100644 --- a/sys/arch/amd64/amd64/locore.S +++ b/sys/arch/amd64/amd64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.132 2023/01/20 16:01:04 deraadt Exp $ */ +/* $OpenBSD: locore.S,v 1.133 2023/04/17 00:03:59 deraadt Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -540,6 +540,7 @@ XUsyscall_meltdown: * In case the CPU speculates past the mov to cr3, we put a * retpoline-style pause-lfence-jmp-to-pause loop. */ + endbr64 swapgs movq %rax,CPUVAR(SCRATCH) movq CPUVAR(KERN_CR3),%rax @@ -551,11 +552,12 @@ KUTEXT_PAGE_END KTEXT_PAGE_START .align NBPG, 0xcc -IDTVEC_NOALIGN(syscall_meltdown) +GENTRY(Xsyscall_meltdown) /* pad to match real Xsyscall_meltdown positioning above */ movq CPUVAR(KERN_CR3),%rax movq %rax,%cr3 -IDTVEC_NOALIGN(syscall) +GENTRY(Xsyscall) + endbr64 swapgs movq %rax,CPUVAR(SCRATCH) SYSCALL_ENTRY /* create trapframe */ |