diff options
author | 2020-01-26 02:19:43 +0000 | |
---|---|---|
committer | 2020-01-26 02:19:43 +0000 | |
commit | 0c401ffc2a2550c32105ce180746b0a95071123b (patch) | |
tree | 994a6f79085f1ee6302c89232f19df252eb6627d /lib/libc/arch | |
parent | Fix comment. (diff) | |
download | wireguard-openbsd-0c401ffc2a2550c32105ce180746b0a95071123b.tar.xz wireguard-openbsd-0c401ffc2a2550c32105ce180746b0a95071123b.zip |
Insert two nop instructions after each svc #0 instruction in userland.
The will be replaced by a speculation barrier as soon as we teach the
kernel to skip over these two instructions when returning from a
system call.
ok patrick@, deraadt@
Diffstat (limited to 'lib/libc/arch')
-rw-r--r-- | lib/libc/arch/aarch64/SYS.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/arch/aarch64/SYS.h b/lib/libc/arch/aarch64/SYS.h index 572db2ace40..ce3c38aa30a 100644 --- a/lib/libc/arch/aarch64/SYS.h +++ b/lib/libc/arch/aarch64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.3 2018/10/01 22:49:50 mortimer Exp $ */ +/* $OpenBSD: SYS.h,v 1.4 2020/01/26 02:19:43 kettenis Exp $ */ /* $NetBSD: SYS.h,v 1.8 2003/08/07 16:42:02 agc Exp $ */ /*- @@ -53,7 +53,9 @@ #define SYSTRAP(x) \ ldr x8, =SYS_ ## x; \ - svc 0 + svc 0; \ + nop; \ + nop #define CERROR _C_LABEL(__cerror) |