diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-10-27 19:40:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-10-27 19:40:24 +0000 |
commit | cfa3ea3fd67ff08d0208c69993c921d0dbf054d0 (patch) | |
tree | 9b43edacb29b4a7567b7d3aab1853de38a3e69a2 /lib/csu | |
parent | 2a4bde1d0a9cb3589b371260779bcc4615a76457 (diff) |
hppa and mips64 have private copies of RCRT0_RELRO(), which should
also perform mimmutable()
ok guenther
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/hppa/boot_md.h | 4 | ||||
-rw-r--r-- | lib/csu/mips64/boot_md.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/csu/hppa/boot_md.h b/lib/csu/hppa/boot_md.h index f63936a9552..a770f7af4bb 100644 --- a/lib/csu/hppa/boot_md.h +++ b/lib/csu/hppa/boot_md.h @@ -1,4 +1,4 @@ -/* $OpenBSD: boot_md.h,v 1.3 2022/01/31 05:43:22 guenther Exp $ */ +/* $OpenBSD: boot_md.h,v 1.4 2022/10/27 19:40:21 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -50,6 +50,7 @@ void _dl_exit(int); */ #define REDIRECT_SYSCALL(x) typeof(x) x asm("_libc_"#x) __dso_hidden REDIRECT_SYSCALL(mprotect); +REDIRECT_SYSCALL(mimmutable); typedef Elf_RelA RELOC_TYPE; @@ -59,6 +60,7 @@ static size_t relro_size; do { \ if (relro_addr != NULL && relro_size != 0) \ mprotect(relro_addr, relro_size, PROT_READ); \ + mimmutable(relro_addr, relro_size); \ } while (0) /* diff --git a/lib/csu/mips64/boot_md.h b/lib/csu/mips64/boot_md.h index 7bf7d1d4784..09fb17f4d6f 100644 --- a/lib/csu/mips64/boot_md.h +++ b/lib/csu/mips64/boot_md.h @@ -1,4 +1,4 @@ -/* $OpenBSD: boot_md.h,v 1.2 2022/01/12 21:41:06 guenther Exp $ */ +/* $OpenBSD: boot_md.h,v 1.3 2022/10/27 19:40:23 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -50,6 +50,7 @@ void _dl_exit(int); */ #define REDIRECT_SYSCALL(x) typeof(x) x asm("_libc_"#x) __dso_hidden REDIRECT_SYSCALL(mprotect); +REDIRECT_SYSCALL(mimmutable); #define DT_PROC(n) ((n) - DT_LOPROC) @@ -76,6 +77,7 @@ static size_t relro_size; do { \ if (relro_addr != NULL && relro_size != 0) \ mprotect(relro_addr, relro_size, PROT_READ); \ + mimmutable(relro_addr, relro_size); \ } while (0) /* |