Bug 15533 - LD_AUDIT introduces an avoidable performance degradation
Summary: LD_AUDIT introduces an avoidable performance degradation
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.35
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-24 23:56 UTC by Alexander Monakov
Modified: 2021-12-28 11:51 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
testcase (439 bytes, application/x-gtar)
2013-05-24 23:56 UTC, Alexander Monakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Monakov 2013-05-24 23:56:08 UTC
Created attachment 7044 [details]
testcase

Introducing an audit library currently force-enables instrumenting for profiling in the dynamic linker (as if LD_AUDIT implied LD_PROFILE).  However, this is not necessary if the audit library does not provide la_plt{enter,exit} symbols.

Attached testcase demonstrates the performance hit:

$ make test
time ./main
0.47user 0.00system 0:00.48elapsed 99%CPU (0avgtext+0avgdata 1984maxresident)k
0inputs+0outputs (0major+170minor)pagefaults 0swaps
time env LD_AUDIT=./libaudit.so ./main
8.96user 0.00system 0:08.97elapsed 99%CPU (0avgtext+0avgdata 3264maxresident)k
0inputs+0outputs (0major+442minor)pagefaults 0swaps
Comment 1 Alexander Monakov 2013-05-25 00:27:35 UTC
Patch: http://sourceware.org/ml/libc-alpha/2013-05/msg00888.html
Comment 2 Nathan Nye 2021-10-05 20:11:44 UTC
This patch causes la_symbind64 to no longer run (also I assume la_symbind32), so the scope isn't limited to just the la_plt{enter,exit} functions.
Comment 3 Adhemerval Zanella 2021-12-28 11:51:58 UTC
Fixed on 2.35 (063f9ba220f434c7f30dd65c4cff17c0c458a7cf).