glibc/sysdeps
H.J. Lu 457bd9cf2e x86-64: Check if mprotect works before rewriting PLT
Systemd execution environment configuration may prohibit changing a memory
mapping to become executable:

MemoryDenyWriteExecute=
Takes a boolean argument. If set, attempts to create memory mappings
that are writable and executable at the same time, or to change existing
memory mappings to become executable, or mapping shared memory segments
as executable, are prohibited.

When it is set, systemd service stops working if PLT rewrite is enabled.
Check if mprotect works before rewriting PLT.  This fixes BZ #31230.
This also works with SELinux when deny_execmem is on.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-01-15 06:59:23 -08:00
..
aarch64 aarch64: Make cpu-features definitions not Linux-specific 2024-01-04 23:48:54 +01:00
alpha Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
arc Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
arm Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
csky Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
generic Make __getrandom_nocancel set errno and add a _nostatus version 2024-01-12 14:23:11 +01:00
gnu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hppa Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
htl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386 math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
ieee754 math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
loongarch Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
m68k math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
mach Make __getrandom_nocancel set errno and add a _nostatus version 2024-01-12 14:23:11 +01:00
microblaze Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mips Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
nios2 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
or1k Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
posix Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
powerpc Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
pthread Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
riscv RISC-V: Enable static-pie. 2024-01-12 15:11:45 -03:00
s390 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sparc Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
unix x86-64: Check if mprotect works before rewriting PLT 2024-01-15 06:59:23 -08:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 x86-64: Check if mprotect works before rewriting PLT 2024-01-15 06:59:23 -08:00
x86_64 x86-64: Check if mprotect works before rewriting PLT 2024-01-15 06:59:23 -08:00