[0/8] Fixes for the system-wide tunables support

Message ID 20260706211524.3801466-1-adhemerval.zanella@linaro.org (mailing list archive)
Headers
Series Fixes for the system-wide tunables support |

Message

Adhemerval Zanella Netto July 6, 2026, 9:14 p.m. UTC
  While going back over the system-wide tunables support (the
/etc/tunables.conf data stored in ld.so.cache) I found some minor
problems (I missed the last version of that series before it went in).

The following are bugfixes and are important for the next release:

  - Add system-wide tunables: implement overridability
  - elf: Bound the tunable cache string table against the mapping size
  - elf: Verify the tunable cache header signature and version
  - elf: Avoid redundant ld.so.cache reload after first load
  - elf: Let environment aliases override overridable system-wide tunables

The remaining patches are cleanup and documentation with no urgency, but
I still think we should have for 2.44 since it is the first version
with system-wide tunables.

This ison top of DJ patch for system-wide tunable overridability [1].

[1] https://sourceware.org/pipermail/libc-alpha/2026-July/178518.html

Adhemerval Zanella (8):
  elf: Bound the tunable cache string table against the mapping size
  elf: Verify the tunable cache header signature and version
  elf: Avoid redundant ld.so.cache reload after first load
  elf: Let environment aliases override overridable system-wide tunables
  elf: Emit tunconf "not recognized" warning on stderr
  manual: Document default AT_SECURE handling for system-wide tunables
  elf: Remove _dl_unload_cache
  elf: Remove unused tunable_seclevel_t

 elf/Makefile                            |  7 +++-
 elf/dl-cache.c                          | 47 +++++++++++++------------
 elf/dl-open.c                           |  5 ---
 elf/dl-tunable-types.h                  | 14 --------
 elf/dl-tunables.c                       | 20 +++++++++--
 elf/rtld.c                              |  5 ---
 elf/tst-tunconf1.c                      | 24 +++++++++++++
 elf/tst-tunconf1.root/etc/tunables.conf |  9 +++++
 elf/tunconf.c                           |  4 +--
 manual/tunables.texi                    | 16 +++++++++
 sysdeps/generic/ldsodefs.h              |  6 ----
 11 files changed, 100 insertions(+), 57 deletions(-)
  

Comments

Andreas K. Huettel July 7, 2026, 1:12 a.m. UTC | #1
Am Dienstag, 7. Juli 2026, 06:14:36 Japanische Normalzeit schrieb Adhemerval Zanella:
> While going back over the system-wide tunables support (the
> /etc/tunables.conf data stored in ld.so.cache) I found some minor
> problems (I missed the last version of that series before it went in).
> 
> The following are bugfixes and are important for the next release:
> 
>   - Add system-wide tunables: implement overridability
>   - elf: Bound the tunable cache string table against the mapping size
>   - elf: Verify the tunable cache header signature and version
>   - elf: Avoid redundant ld.so.cache reload after first load
>   - elf: Let environment aliases override overridable system-wide tunables

Without looking at the code yet, let's add the whole series as desirable and 
try to get the r-b's and push as quickly as possible?!

Any suggestions who to talk to directly?

> 
> The remaining patches are cleanup and documentation with no urgency, but
> I still think we should have for 2.44 since it is the first version
> with system-wide tunables.


> 
> This ison top of DJ patch for system-wide tunable overridability [1].
> 
> [1] https://sourceware.org/pipermail/libc-alpha/2026-July/178518.html
> 
> Adhemerval Zanella (8):
>   elf: Bound the tunable cache string table against the mapping size
>   elf: Verify the tunable cache header signature and version
>   elf: Avoid redundant ld.so.cache reload after first load
>   elf: Let environment aliases override overridable system-wide tunables
>   elf: Emit tunconf "not recognized" warning on stderr
>   manual: Document default AT_SECURE handling for system-wide tunables
>   elf: Remove _dl_unload_cache
>   elf: Remove unused tunable_seclevel_t
> 
>  elf/Makefile                            |  7 +++-
>  elf/dl-cache.c                          | 47 +++++++++++++------------
>  elf/dl-open.c                           |  5 ---
>  elf/dl-tunable-types.h                  | 14 --------
>  elf/dl-tunables.c                       | 20 +++++++++--
>  elf/rtld.c                              |  5 ---
>  elf/tst-tunconf1.c                      | 24 +++++++++++++
>  elf/tst-tunconf1.root/etc/tunables.conf |  9 +++++
>  elf/tunconf.c                           |  4 +--
>  manual/tunables.texi                    | 16 +++++++++
>  sysdeps/generic/ldsodefs.h              |  6 ----
>  11 files changed, 100 insertions(+), 57 deletions(-)
> 
>
  
Adhemerval Zanella Netto July 7, 2026, 2:16 p.m. UTC | #2
On 06/07/26 22:12, Andreas K. Huettel wrote:
> Am Dienstag, 7. Juli 2026, 06:14:36 Japanische Normalzeit schrieb Adhemerval Zanella:
>> While going back over the system-wide tunables support (the
>> /etc/tunables.conf data stored in ld.so.cache) I found some minor
>> problems (I missed the last version of that series before it went in).
>>
>> The following are bugfixes and are important for the next release:
>>
>>   - Add system-wide tunables: implement overridability
>>   - elf: Bound the tunable cache string table against the mapping size
>>   - elf: Verify the tunable cache header signature and version
>>   - elf: Avoid redundant ld.so.cache reload after first load
>>   - elf: Let environment aliases override overridable system-wide tunables
> 
> Without looking at the code yet, let's add the whole series as desirable and 
> try to get the r-b's and push as quickly as possible?!
> 
> Any suggestions who to talk to directly?

I would expect that DJ would give me some feedback whether he thinks this
fixes would be desirable for this release.  Since this is a new feature,
I also think it would be better to have a working implementation *without*
any know corner cases (even though we can backport the fixes).

The 'elf: Bound the tunable cache string table against the mapping size'
and 'elf: Verify the tunable cache header signature and version' are both
harderning and I think it it should be a requirement.

The 'elf: Avoid redundant ld.so.cache reload after first load' is a optimization
that avoid reloading the ld.so.cache on some cases, which is another point
of this whole mechanism of keeping the cache mapped.  Not strictly required,
but nice to have it.

The 'elf: Let environment aliases override overridable system-wide tunables'
is to keep the old environment variable with same expectation of the new
new system-wide tunables.  Also not strictly required, but I added for
completeness.

The rest of the patchset can be postponed to next release.

> 
>>
>> The remaining patches are cleanup and documentation with no urgency, but
>> I still think we should have for 2.44 since it is the first version
>> with system-wide tunables.
> 
> 
>>
>> This ison top of DJ patch for system-wide tunable overridability [1].
>>
>> [1] https://sourceware.org/pipermail/libc-alpha/2026-July/178518.html
>>
>> Adhemerval Zanella (8):
>>   elf: Bound the tunable cache string table against the mapping size
>>   elf: Verify the tunable cache header signature and version
>>   elf: Avoid redundant ld.so.cache reload after first load
>>   elf: Let environment aliases override overridable system-wide tunables
>>   elf: Emit tunconf "not recognized" warning on stderr
>>   manual: Document default AT_SECURE handling for system-wide tunables
>>   elf: Remove _dl_unload_cache
>>   elf: Remove unused tunable_seclevel_t
>>
>>  elf/Makefile                            |  7 +++-
>>  elf/dl-cache.c                          | 47 +++++++++++++------------
>>  elf/dl-open.c                           |  5 ---
>>  elf/dl-tunable-types.h                  | 14 --------
>>  elf/dl-tunables.c                       | 20 +++++++++--
>>  elf/rtld.c                              |  5 ---
>>  elf/tst-tunconf1.c                      | 24 +++++++++++++
>>  elf/tst-tunconf1.root/etc/tunables.conf |  9 +++++
>>  elf/tunconf.c                           |  4 +--
>>  manual/tunables.texi                    | 16 +++++++++
>>  sysdeps/generic/ldsodefs.h              |  6 ----
>>  11 files changed, 100 insertions(+), 57 deletions(-)
>>
>>
> 
>