glibc/sysdeps/x86_64
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
..
64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fpu 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
multiarch 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
sys Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
____longjmp_chk.S
__longjmp.S x86-64/cet: Check the restore token in longjmp 2024-01-04 13:38:26 -08:00
_mcount.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
abort-instr.h
add_n.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
addmul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-cet.awk x86-64/cet: Move check-cet.awk to x86_64 2024-01-10 05:20:16 -08:00
configure elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT 2024-01-05 05:49:49 -08:00
configure.ac elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT 2024-01-05 05:49:49 -08:00
crti.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
crtn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-cache.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-cet.c x86-64/cet: Move dl-cet.[ch] to x86_64 directories 2024-01-10 05:19:32 -08:00
dl-dtprocnum.h elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT 2024-01-05 05:49:49 -08:00
dl-hwcaps-subdirs.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-machine.h x86-64/cet: Make CET feature check specific to Linux/x86 2024-01-11 20:35:24 -08:00
dl-plt-rewrite.h x86-64: Check if mprotect works before rewriting PLT 2024-01-15 06:59:23 -08:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-procruntime.c i386: Remove CET support bits 2024-01-10 05:20:20 -08:00
dl-runtime.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tls.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-trampoline.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-trampoline.S i386: Remove CET support bits 2024-01-10 05:20:20 -08:00
feature-control.h i386: Remove CET support bits 2024-01-10 05:20:20 -08:00
features-offsets.sym i386: Remove CET support bits 2024-01-10 05:20:20 -08:00
ffs.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ffsll.c x86_64: Optimize ffsll function code size. 2024-01-13 12:20:08 -08:00
ifuncmain8.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ifuncmod8.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Implies
isa-default-impl.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
isa.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
l10nflist.c
ldsodefs.h i386: Remove CET support bits 2024-01-10 05:20:20 -08:00
libc-start.h x86: Move x86-64 shadow stack startup codes 2024-01-10 05:19:32 -08:00
link_map.h elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT 2024-01-05 05:49:49 -08:00
link-defines.sym
locale-defines.sym
localplt.data elf: Rework exception handling in the dynamic loader [BZ #25486] 2022-11-03 09:39:31 +01:00
lshift.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makefile i386: Remove CET support bits 2024-01-10 05:20:20 -08:00
memchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcmpeq.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy.S x86_64: Fix build with --disable-multiarch (BZ 30721) 2023-08-10 10:29:29 -03:00
memmove_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memmove.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mempcpy.S
memrchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mp_clz_tab.c
mul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
preconfigure configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
preconfigure.ac
rawmemchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rshift.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rtld-offsets.sym
setjmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stackguard-macros.h
stackinfo.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
start.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stpncpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcasecmp_l-nonascii.c
strcasecmp_l.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcasecmp.S
strcat.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchr-isa-default-impl.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchrnul.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcspn-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcspn.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strncase_l-nonascii.c
strncase_l.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strncase.S
strncat.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strncmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strncpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strnlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strpbrk-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strpbrk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strrchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strspn-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strspn.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sub_n.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
submul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sysdep.h i386: Remove CET support 2024-01-09 13:55:51 -03:00
tls_get_addr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tlsdesc.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tlsdesc.sym
tst-audit3.c
tst-audit4-aux.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit4.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit5.c
tst-audit6.c
tst-audit7.c
tst-audit10-aux.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit10.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-auditmod3a.c
tst-auditmod3b.c
tst-auditmod4a.c
tst-auditmod4b.c
tst-auditmod5a.c
tst-auditmod5b.c
tst-auditmod6a.c
tst-auditmod6b.c
tst-auditmod6c.c
tst-auditmod7a.c
tst-auditmod7b.c
tst-auditmod10a.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-auditmod10b.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-avx512-aux.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-avx512.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-avx512mod.c
tst-avx-aux.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-avx.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-avxmod.c
tst-cet-legacy-1.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-1a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-2.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-2a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-3.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-4.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-4a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-4b.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-4c.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-5.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-5a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-5b.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-6.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-6a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-6b.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-7.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-8.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-9-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-9.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-10-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-10.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-10a-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-10a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-1.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-2.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-4.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-5.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-5a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-5b.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-5c.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-6.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-6a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-6b.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-6c.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-cet-legacy-mod-6d.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-glibc-hwcaps.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-platform-1.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-platformmod-1.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-platformmod-2.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-plt-rewrite1.c elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT 2024-01-05 05:49:49 -08:00
tst-plt-rewrite2.c x32: Handle displacement overflow in PLT rewrite [BZ #31218] 2024-01-06 14:25:49 -08:00
tst-plt-rewritemod1.c elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT 2024-01-05 05:49:49 -08:00
tst-plt-rewritemod2.c x32: Handle displacement overflow in PLT rewrite [BZ #31218] 2024-01-06 14:25:49 -08:00
tst-quad1.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-quad1pie.c
tst-quad2.c
tst-quad2pie.c
tst-quadmod1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-quadmod1pie.S
tst-quadmod2.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-quadmod2pie.S
tst-rsi-strlen.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-rsi-wcslen.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-shstk-legacy-1-extra.S x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1a-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1a.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1b-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1b.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1c-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1c.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1d-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1d.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1e-static.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1e-static.sh x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1e.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1e.sh x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1f.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1g.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-1g.sh x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-shstk-legacy-mod-1.c x86: Move CET infrastructure to x86_64 2024-01-09 13:55:51 -03:00
tst-split-dynreloc.c
tst-split-dynreloc.lds
tst-sse.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-ssemod.c
varshift.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Versions
wcpcpy-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcpcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcpncpy-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcpncpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcscat-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcscat.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcschr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcscmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcscpy-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcscpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcslen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsncat-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsncat.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsncmp-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsncmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsncpy-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsncpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsnlen-generic.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsnlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcsrchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wmemchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wmemcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wmemset_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wmemset.S
wordcopy.c
x86-lp_size.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00