[PATCH] rtld: Add glibc.rtld.enable_secure tunable.

Szabolcs Nagy szabolcs.nagy@arm.com
Tue Dec 5 15:51:19 GMT 2023


The 12/05/2023 10:35, Joe Simmons-Talbott wrote:
> Add a tunable for setting __libc_enable_secure to 1.  Does not set
> __libc_enable_secure to 0 if the tunable is set to 0.  Ignores any
> tunables following glib.rtld.enable_secure.  One use-case for this

why do you want to ignore later tunables?

> addition is to enable testing code paths that depend on
> __libc_eanble_secure being set without the need to use setxid binaries.
> ---
> NOTE: I'm not certain I've picked the appropriate place to handle
> glibc.rtld.enable_secure.  I tried to make it happen as early as
> possible to minimize and places where __libc_enable_secure might be
> checked before the tunable initialization takes place.
> 
>  NEWS                             |   4 ++
>  csu/libc-start.c                 |   4 ++

your code only seem to affect static linking.
(apart from the 'ignore later tunables' behaviour)

e.g. i'd expect some change in sysdeps/unix/sysv/linux/dl-sysdep.c

>  elf/Makefile                     |   2 +
>  elf/dl-tunables.c                |   8 ++-
>  elf/dl-tunables.h                |  11 +++
>  elf/dl-tunables.list             |   6 ++
>  elf/tst-rtld-list-tunables.exp   |   1 +
>  elf/tst-tunables-enable_secure.c | 115 +++++++++++++++++++++++++++++++
>  8 files changed, 150 insertions(+), 1 deletion(-)
>  create mode 100644 elf/tst-tunables-enable_secure.c


More information about the Libc-alpha mailing list