[PATCH 1/5] elf: Fix audit regression

Florian Weimer fweimer@redhat.com
Wed Jul 7 19:02:01 GMT 2021


* Adhemerval Zanella via Libc-alpha:

> diff --git a/elf/Makefile b/elf/Makefile
> index b1e01d9516..5214196de6 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile

> @@ -361,6 +361,7 @@ modules-names += tst-gnu2-tls1mod
>  $(objpfx)tst-gnu2-tls1: $(objpfx)tst-gnu2-tls1mod.so
>  tst-gnu2-tls1mod.so-no-z-defs = yes
>  CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=gnu2
> +

Spurious whitespace change.  Or rather, missing CFLAGS for
tst-auditmod17 to disable stack protector.  I expect the test to fail
when building glibc with -fstack-protector-all.

> diff --git a/elf/dl-open.c b/elf/dl-open.c
> index a066f39bd0..66ec9d7ed5 100644
> --- a/elf/dl-open.c
> +++ b/elf/dl-open.c
> @@ -771,7 +771,7 @@ dl_open_worker (void *a)
>      {
>        struct link_map *libc_map = GL(dl_ns)[args->nsid].libc_map;
>  #ifdef SHARED
> -      bool initial = libc_map->l_ns == LM_ID_BASE;
> +      bool initial = libc_map != NULL ? libc_map->l_ns == LM_ID_BASE : false;
>  #else
>        /* In the static case, there is only one namespace, but it
>  	 contains a secondary libc (the primary libc is statically

Looks okay to me.  The previous code was just broken.

Thanks,
Florian



More information about the Libc-alpha mailing list