diff options
author | 2018-10-01 22:53:48 +0000 | |
---|---|---|
committer | 2018-10-01 22:53:48 +0000 | |
commit | 6b54b65fc47ca010fa767fac58692a061ac83b91 (patch) | |
tree | 3d6bb94f913b8406d3470a8005609b7a4f35d16e | |
parent | Add retguard to arm64 libc syscalls and setjmp / longjmp. (diff) | |
download | wireguard-openbsd-6b54b65fc47ca010fa767fac58692a061ac83b91.tar.xz wireguard-openbsd-6b54b65fc47ca010fa767fac58692a061ac83b91.zip |
Add retguard to arm64 ld.so.
ok kettenis@
-rw-r--r-- | libexec/ld.so/aarch64/SYS.h | 10 | ||||
-rw-r--r-- | libexec/ld.so/aarch64/ldasm.S | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libexec/ld.so/aarch64/SYS.h b/libexec/ld.so/aarch64/SYS.h index 78ef7c402c3..8131bd9b9fb 100644 --- a/libexec/ld.so/aarch64/SYS.h +++ b/libexec/ld.so/aarch64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.2 2018/05/15 20:37:48 kettenis Exp $ */ +/* $OpenBSD: SYS.h,v 1.3 2018/10/01 22:53:48 mortimer Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -37,10 +37,8 @@ .global __CONCAT(_dl_,n) ;\ .type __CONCAT(_dl_,n)%function ;\ __CONCAT(_dl_,n): ;\ + RETGUARD_SETUP(__CONCAT(_dl_,n), x15) ;\ SYSTRAP(n) ;\ - bcs .L_cerr ;\ - ret - -.L_cerr: - neg x0, x0 /* r0 = -errno */ + cneg x0, x0, cs /* r0 = -errno */ ;\ + RETGUARD_CHECK(__CONCAT(_dl_,n), x15) ;\ ret diff --git a/libexec/ld.so/aarch64/ldasm.S b/libexec/ld.so/aarch64/ldasm.S index 2ba592fd6f1..64c594e291c 100644 --- a/libexec/ld.so/aarch64/ldasm.S +++ b/libexec/ld.so/aarch64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.6 2018/07/24 09:27:44 kettenis Exp $ */ +/* $OpenBSD: ldasm.S,v 1.7 2018/10/01 22:53:48 mortimer Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -105,5 +105,7 @@ ENTRY(_dl_bind_start) br x17 ENTRY(_rtld_tlsdesc) + RETGUARD_SETUP(_rtld_tlsdesc, x15) ldr x0, [x0, #8] + RETGUARD_CHECK(_rtld_tlsdesc, x15) ret |