glibc/sysdeps
Szabolcs Nagy cd543b5eb3 aarch64: Use mmap to add PROT_BTI instead of mprotect [BZ #26831]
Re-mmap executable segments if possible instead of using mprotect
to add PROT_BTI. This allows using BTI protection with security
policies that prevent mprotect with PROT_EXEC.

If the fd of the ELF module is not available because it was kernel
mapped then mprotect is used and failures are ignored.  To protect
the main executable even when mprotect is filtered the linux kernel
 will have to be changed to add PROT_BTI to it.

The delayed failure reporting is mainly needed because currently
_dl_process_gnu_properties does not propagate failures such that
the required cleanups happen. Using the link_map_machine struct for
error propagation is not ideal, but this seemed to be the least
intrusive solution.

Fixes bug 26831.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-12-11 15:46:02 +00:00
..
aarch64 aarch64: Use mmap to add PROT_BTI instead of mprotect [BZ #26831] 2020-12-11 15:46:02 +00:00
alpha nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
arc nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
arm nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
csky nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
generic elf: Pass the fd to note processing 2020-12-11 15:45:37 +00:00
gnu string: Fix strerrorname_np return value [BZ #26555] 2020-09-29 13:56:06 -03:00
hppa nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
htl htl: Add hidden def for __pthread_create/detach 2020-12-03 12:21:47 +01:00
hurd hurd: Remove some remnants of cthreads 2020-11-15 13:16:03 +01:00
i386 x86: Fix THREAD_SELF definition to avoid ld.so crash (bug 27004) 2020-12-03 13:48:55 +01:00
ia64 nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
ieee754 Remove tls.h inclusion from internal errno.h 2020-11-13 12:59:19 -03:00
m68k nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
mach nss: Implement <nss_database.h> 2020-12-04 17:15:44 -05:00
microblaze nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
mips nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
nios2 nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
nptl nss: Implement <nss_database.h> 2020-12-04 17:15:44 -05:00
posix nsswitch: use new internal API (callers) 2020-12-04 17:16:32 -05:00
powerpc powerpc64le: Add glibc-hwcaps support 2020-12-04 14:50:49 +01:00
pthread y2038: Convert aio_suspend to support 64 bit time 2020-11-30 14:08:44 +01:00
riscv nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
s390 s390x: Add glibc-hwcaps support 2020-12-10 13:51:18 +01:00
sh sh: Add sh4 fpu Implies folder 2020-11-27 09:29:35 -03:00
sparc nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
unix linux: Consolidate brk implementation 2020-12-10 17:42:37 -03:00
wordsize-32 Make strtoimax, strtoumax, wcstoimax, wcstoumax into aliases 2020-12-08 18:15:27 +00:00
wordsize-64 Make strtoimax, strtoumax, wcstoimax, wcstoumax into aliases 2020-12-08 18:15:27 +00:00
x86 elf: Pass the fd to note processing 2020-12-11 15:45:37 +00:00
x86_64 x86_64: Add glibc-hwcaps support 2020-12-04 09:36:02 +01:00