summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2020-03-11 12:53:19 +0000
committerderaadt <deraadt@openbsd.org>2020-03-11 12:53:19 +0000
commitf377c7672bd38a70b428cd7751ceff0af609e750 (patch)
treef513ba805b364ed7490f062132397828c6e0dd9b /lib/libc
parentfix spelling of IMSG_VMDOP_TERMINATE_VM_RESPONSE in comment (diff)
downloadwireguard-openbsd-f377c7672bd38a70b428cd7751ceff0af609e750.tar.xz
wireguard-openbsd-f377c7672bd38a70b428cd7751ceff0af609e750.zip
Anthony Steinhauser reports that 32-bit arm cpus have the same speculation
problems as 64-bit models. For the syscall instruction issue, add nop;nop after swi 0, in preparation for jumping over a speculation barrier here later. ok kettenis
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/arm/SYS.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/arch/arm/SYS.h b/lib/libc/arch/arm/SYS.h
index b78ae2d00c4..f1a6eadf797 100644
--- a/lib/libc/arch/arm/SYS.h
+++ b/lib/libc/arch/arm/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.16 2016/08/06 19:16:09 guenther Exp $ */
+/* $OpenBSD: SYS.h,v 1.17 2020/03/11 12:53:19 deraadt Exp $ */
/* $NetBSD: SYS.h,v 1.8 2003/08/07 16:42:02 agc Exp $ */
/*-
@@ -53,8 +53,10 @@
__END_HIDDEN(x); END(x)
#define SYSTRAP(x) \
- ldr r12, =SYS_ ## x; \
- swi 0
+ ldr r12, =SYS_ ## x; \
+ swi 0; \
+ nop; \
+ nop
#define CERROR _C_LABEL(__cerror)