summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2020-10-16 23:42:53 +0000
committerderaadt <deraadt@openbsd.org>2020-10-16 23:42:53 +0000
commitac44ab0d128055f2f7e7b4411beb86f83c6eb8ff (patch)
tree05330028bbe593b7d35e3ec7eb3dbc1493ffd931 /libexec
parentAdapt SYS.h to use retguard macros from asm.h, so that generated system (diff)
downloadwireguard-openbsd-ac44ab0d128055f2f7e7b4411beb86f83c6eb8ff.tar.xz
wireguard-openbsd-ac44ab0d128055f2f7e7b4411beb86f83c6eb8ff.zip
Use the retguard macros from asm.h to protect the system call stubs.
ok mortimer kettenis
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/powerpc64/SYS.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libexec/ld.so/powerpc64/SYS.h b/libexec/ld.so/powerpc64/SYS.h
index 3c8b413e78e..23d084146af 100644
--- a/libexec/ld.so/powerpc64/SYS.h
+++ b/libexec/ld.so/powerpc64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.1 2020/06/25 04:00:58 drahn Exp $ */
+/* $OpenBSD: SYS.h,v 1.2 2020/10/16 23:42:53 deraadt Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -31,9 +31,12 @@
#define DL_SYSCALL(n) \
ENTRY(_dl_##n) \
+ RETGUARD_SETUP(_dl_##n, %r11) ;\
li %r0, SYS_##n ;\
sc ;\
cmpdi %r0, 0 ;\
- beqlr+ ;\
+ beq .L_end##n ;\
neg %r3, %r3 ;\
+.L_end##n: ;\
+ RETGUARD_CHECK(_dl_##n, %r11) ;\
blr