diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-30 10:24:09 -0300 |
|---|---|---|
| committer | Carlos O'Donell <carlos@redhat.com> | 2022-03-29 17:02:03 -0400 |
| commit | 09c5dcf73b40e69a3dae97b6f98007797ad263eb (patch) | |
| tree | 22e0eb8ecc38c10e595ee17636cd053388b89745 /include/link.h | |
| parent | 696f66660ba05a4e15db25c14d664f4fd5eb6a3b (diff) | |
| download | glibc-09c5dcf73b40e69a3dae97b6f98007797ad263eb.tar.xz glibc-09c5dcf73b40e69a3dae97b6f98007797ad263eb.zip | |
elf: Avoid unnecessary slowdown from profiling with audit (BZ#15533)
The rtld-audit interfaces introduces a slowdown due to enabling
profiling instrumentation (as if LD_AUDIT implied LD_PROFILE).
However, instrumenting is only necessary if one of audit libraries
provides PLT callbacks (la_pltenter or la_pltexit symbols). Otherwise,
the slowdown can be avoided.
The following patch adjusts the logic that enables profiling to iterate
over all audit modules and check if any of those provides a PLT hook.
To keep la_symbind to work even without PLT callbacks, _dl_fixup now
calls the audit callback if the modules implements it.
Co-authored-by: Alexander Monakov <amonakov@ispras.ru>
Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
(cherry picked from commit 063f9ba220f434c7f30dd65c4cff17c0c458a7cf)
Resolved conflicts:
NEWS
elf/Makefile
Diffstat (limited to 'include/link.h')
| -rw-r--r-- | include/link.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/link.h b/include/link.h index c46aced9f7..12a740bed1 100644 --- a/include/link.h +++ b/include/link.h @@ -358,8 +358,10 @@ struct auditstate #if __ELF_NATIVE_CLASS == 32 # define symbind symbind32 +# define LA_SYMBIND "la_symbind32" #elif __ELF_NATIVE_CLASS == 64 # define symbind symbind64 +# define LA_SYMBIND "la_symbind64" #else # error "__ELF_NATIVE_CLASS must be defined" #endif |
