]> git.ipfire.org Git - thirdparty/glibc.git/commit
Add system-wide tunables: cache ld.so.cache
authorDJ Delorie <dj@redhat.com>
Tue, 30 Jun 2026 20:49:42 +0000 (16:49 -0400)
committerDJ Delorie <dj@redhat.com>
Tue, 30 Jun 2026 20:49:42 +0000 (16:49 -0400)
commitb9957a70b82203d91b0659b93cfe8632f954aba3
tree76985d6f40dc401ad211703add041647453f996e
parente24269f74b8cd37ce33652e752f8012c3bfcdadc
Add system-wide tunables: cache ld.so.cache

The purpose of this change is twofold:

1. The ld.so.cache is cached in memory and only re-read if/when
   it changes on disk.  This allows us to have much more intensive
   security checks in the future, without impacting performance as
   much.  It also allows for cases where the cache is corrupted -
   we continue using the last valid one.

2. We break out the load/check logic so that the cache can be
   loaded independently of the library lookup, such as for
   code that only needs to look at the extensions.

Reviewed-by: Arjun Shankar <arjun@redhat.com>
elf/Makefile
elf/dl-cache.c
elf/tst-ldconfig-cache.c [new file with mode: 0644]
elf/tst-ldconfig-cache.root/etc/ld.so.conf [new file with mode: 0644]
elf/tst-ldconfig-cache.root/ldconfig.req [new file with mode: 0644]
elf/tst-ldconfig-cache.root/tst-ldconfig-cache.script [new file with mode: 0644]