diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-04-26 14:23:02 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-04-26 14:24:36 +0200 |
commit | 8dcb6d0af07fda3607b541857e4f3970a74ed55b (patch) | |
tree | 06a15719ac286241c9faf9bfd4a802d57ee08bc8 /elf/Makefile | |
parent | c935789bdf40ba22b5698da869d3a4789797e09f (diff) | |
download | glibc-8dcb6d0af07fda3607b541857e4f3970a74ed55b.tar.gz glibc-8dcb6d0af07fda3607b541857e4f3970a74ed55b.tar.xz glibc-8dcb6d0af07fda3607b541857e4f3970a74ed55b.zip |
dlfcn: Do not use rtld_active () to determine ld.so state (bug 29078)
When audit modules are loaded, ld.so initialization is not yet complete, and rtld_active () returns false even though ld.so is mostly working. Instead, the static dlopen hook is used, but that does not work at all because this is not a static dlopen situation. Commit 466c1ea15f461edb8e3ffaf5d86d708876343bbf ("dlfcn: Rework static dlopen hooks") moved the hook pointer into _rtld_global_ro, which means that separate protection is not needed anymore and the hook pointer can be checked directly. The guard for disabling libio vtable hardening in _IO_vtable_check should stay for now. Fixes commit 8e1472d2c1e25e6eabc2059170731365f6d5b3d1 ("ld.so: Examine GLRO to detect inactive loader [BZ #20204]"). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/Makefile')
-rw-r--r-- | elf/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile index 8ed6c3b0b1..e4907d5de9 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -390,6 +390,7 @@ tests += \ tst-audit24d \ tst-audit25a \ tst-audit25b \ + tst-audit26 \ tst-auditmany \ tst-auxobj \ tst-auxobj-dlopen \ @@ -767,6 +768,7 @@ modules-names = \ tst-auditmod24c \ tst-auditmod24d \ tst-auditmod25 \ + tst-auditmod26 \ tst-auxvalmod \ tst-big-note-lib \ tst-deep1mod1 \ @@ -2286,6 +2288,10 @@ $(objpfx)tst-audit25b: $(objpfx)tst-audit25mod1.so \ LDFLAGS-tst-audit25b = -Wl,-z,now tst-audit25b-ARGS = -- $(host-test-program-cmd) +$(objpfx)tst-audit26.out: $(objpfx)tst-auditmod26.so +$(objpfx)tst-auditmod26.so: $(libsupport) +tst-audit26-ENV = LD_AUDIT=$(objpfx)tst-auditmod26.so + # tst-sonamemove links against an older implementation of the library. LDFLAGS-tst-sonamemove-linkmod1.so = \ -Wl,--version-script=tst-sonamemove-linkmod1.map \ |