summaryrefslogtreecommitdiff
path: root/lib/csu
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-02-18 12:19:12 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-02-18 12:19:12 +0000
commitabaeee0c2de5db354ea200288f678a16ca5ea4bb (patch)
tree470771504e5b18405e7e6725c6b9836a6e05d677 /lib/csu
parent7d507c040f5f8f249c657a3d207a3bf7bdc53eec (diff)
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/csu')
-rw-r--r--lib/csu/aarch64/md_init.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/csu/aarch64/md_init.h b/lib/csu/aarch64/md_init.h
index 48d0f29da96..36f475682b4 100644
--- a/lib/csu/aarch64/md_init.h
+++ b/lib/csu/aarch64/md_init.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: md_init.h,v 1.6 2020/01/26 02:19:43 kettenis Exp $ */
+/* $OpenBSD: md_init.h,v 1.7 2020/02/18 12:19:11 kettenis Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
@@ -113,6 +113,6 @@
"_dl_exit: \n" \
" mov x8, #1 \n" \
" svc #0 \n" \
- " nop \n" \
- " nop \n" \
+ " dsb nsh \n" \
+ " isb \n" \
".previous");