summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2020-02-18 12:19:11 +0000
committerkettenis <kettenis@openbsd.org>2020-02-18 12:19:11 +0000
commit5ecc9681133f1894e81c385eddd09981f78f1193 (patch)
treef90e35c6df877071032ae72f1b5098f034597860 /lib/libc
parentCleanup <sys/kthread.h> and <sys/proc.h> includes. (diff)
downloadwireguard-openbsd-5ecc9681133f1894e81c385eddd09981f78f1193.tar.xz
wireguard-openbsd-5ecc9681133f1894e81c385eddd09981f78f1193.zip
Now that the kernel skips the two instructions immediately following
a syscall, replace the double nop with a dsb nsh; isb; sequence which stops the CPU from speculating any further. This fix was suggested by Anthony Steinhauser. ok deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/aarch64/SYS.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/arch/aarch64/SYS.h b/lib/libc/arch/aarch64/SYS.h
index ce3c38aa30a..0c5fd4572a3 100644
--- a/lib/libc/arch/aarch64/SYS.h
+++ b/lib/libc/arch/aarch64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.4 2020/01/26 02:19:43 kettenis Exp $ */
+/* $OpenBSD: SYS.h,v 1.5 2020/02/18 12:19:11 kettenis Exp $ */
/* $NetBSD: SYS.h,v 1.8 2003/08/07 16:42:02 agc Exp $ */
/*-
@@ -54,8 +54,8 @@
#define SYSTRAP(x) \
ldr x8, =SYS_ ## x; \
svc 0; \
- nop; \
- nop
+ dsb nsh; \
+ isb
#define CERROR _C_LABEL(__cerror)