diff options
author | deraadt <deraadt@openbsd.org> | 2020-10-16 23:42:53 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2020-10-16 23:42:53 +0000 |
commit | ac44ab0d128055f2f7e7b4411beb86f83c6eb8ff (patch) | |
tree | 05330028bbe593b7d35e3ec7eb3dbc1493ffd931 /libexec | |
parent | Adapt SYS.h to use retguard macros from asm.h, so that generated system (diff) | |
download | wireguard-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.h | 7 |
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 |