diff options
author | 2020-03-11 12:53:19 +0000 | |
---|---|---|
committer | 2020-03-11 12:53:19 +0000 | |
commit | f377c7672bd38a70b428cd7751ceff0af609e750 (patch) | |
tree | f513ba805b364ed7490f062132397828c6e0dd9b | |
parent | fix spelling of IMSG_VMDOP_TERMINATE_VM_RESPONSE in comment (diff) | |
download | wireguard-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
-rw-r--r-- | lib/libc/arch/arm/SYS.h | 8 | ||||
-rw-r--r-- | libexec/ld.so/arm/SYS.h | 6 |
2 files changed, 9 insertions, 5 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) diff --git a/libexec/ld.so/arm/SYS.h b/libexec/ld.so/arm/SYS.h index e20b67ae0ae..2147c2a81c5 100644 --- a/libexec/ld.so/arm/SYS.h +++ b/libexec/ld.so/arm/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.1 2017/08/27 21:59:52 deraadt Exp $ */ +/* $OpenBSD: SYS.h,v 1.2 2020/03/11 12:53:21 deraadt Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -31,7 +31,9 @@ #define SYSTRAP(x) \ ldr r12, =SYS_ ## x; \ - swi 0 + swi 0; \ + nop; \ + nop #define DL_SYSCALL(n) \ .global __CONCAT(_dl_,n) ;\ |