public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>,
	Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH 00/33] RFC: RELRO link maps
Date: Fri, 7 Jul 2023 09:48:30 -0300	[thread overview]
Message-ID: <9495eead-7153-82dc-ccf8-7e5ff089ba40@linaro.org> (raw)
In-Reply-To: <87pm53gafm.fsf@oldenburg.str.redhat.com>



On 07/07/23 09:42, Florian Weimer wrote:
> * Florian Weimer:
> 
>>> I will take a look of what might be happening here.
>>
>> I can't find the failure anymore.
>>
>> What's the target triplet for this builder?  What's the closest
>> build-many-glibcs.py configuration?
> 
> I managed to reproduce it using the arm-linux-gnueabihf configureation:
> 
> openat(AT_FDCWD, "./", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
> read(3, 0xffcd9a28, 512)                = -1 EISDIR (Is a directory)
> close(3)                                = 0
> dlopen [initial] (NULL): ./: cannot read file data: Is a directory
> exit_group(1)                           = ?
> 
> Or alternatively, using a different LD_LIBRARY_PATH setting with an
> absolute path:
> 
> openat(AT_FDCWD, "/root/build/", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
> read(3, 0xffe12f18, 512)                = -1 EISDIR (Is a directory)
> close(3)                                = 0
> dlopen [initial] (NULL): /root/build/: cannot read file data: Is a directory
> exit_group(1)                           = ?
> 
> I assume it's the same failure.
> 
> It's because there's no vDSO:
> 
> 00010000-00098000 r-xp 00000000 fd:00 11958481                           /root/build/dlfcn/tststatic4
> 00098000-000b5000 rw-p 00087000 fd:00 11958481                           /root/build/dlfcn/tststatic4
> 000b5000-000b8000 rw-p 00000000 00:00 0                                  [heap]
> 000b8000-000da000 rw-p 00000000 00:00 0                                  [heap]
> f7fef000-f7ff0000 r-xp 00000000 00:00 0                                  [sigpage]
> fffcf000-ffff0000 rw-p 00000000 00:00 0                                  [stack]
> ffff0000-ffff1000 r-xp 00000000 00:00 0                                  [vectors]
> 
> This means that the main map is the only map, and l_prev and l_next are
> NULL.  The _dl_lookup_map function treats this as the early startup
> situation, where things show up in the hash table but are not actually
> on the list.
> 
> I think I can #ifdef out that check for !SHARED.

I also seeing extra regressions on arm-linux-gnueabihf:

FAIL: elf/tst-audit11
FAIL: elf/tst-audit12
FAIL: elf/tst-audit2
FAIL: elf/tst-audit9
FAIL: elf/tst-tls-ie-dlmopen


$ cat elf/tst-audit11.out
Start

$ cat elf/tst-audit12.out
Start

$ cat elf/tst-audit2.out
version: 2
objopen: 0, �t��
objopen: 0, /home/adhemerval.zanella/projects/glibc/build/arm-linux-gnueabihf/elf/ld.so
activity: add
objsearch: libc.so.6, LA_SET_ORIG
objsearch: /home/adhemerval.zanella/projects/glibc/build/arm-linux-gnueabihf/libc.so.6, LA_SER_RUNPATH
objopen: 0, /home/adhemerval.zanella/projects/glibc/build/arm-linux-gnueabihf/libc.so.6
symbind32: symname=calloc, st_value=0x7af938, ndx=68, flags=8
symbind32: symname=free, st_value=0xf7709774, ndx=1547, flags=8
symbind32: symname=malloc, st_value=0xf7708ed0, ndx=397, flags=8
symbind32: symname=realloc, st_value=0xf7709b20, ndx=2033, flags=8
symbind32: symname=__tls_get_addr, st_value=0xf7b786a4, ndx=19, flags=3
symbind32: symname=malloc, st_value=0xf7708ed0, ndx=397, flags=0
pltenter: symname=malloc, st_value=0xf7708ed0, ndx=397, flags=0
symbind32: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
symbind32: symname=memset, st_value=0xf770fbf0, ndx=1300, flags=0
pltenter: symname=memset, st_value=0xf770fbf0, ndx=1300, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
pltenter: symname=__tunable_get_val, st_value=0xf7b79610, ndx=30, flags=0
activity: consistent
symbind32: symname=mmap, st_value=0xf777fc5c, ndx=3064, flags=0
pltenter: symname=mmap, st_value=0xf777fc5c, ndx=3064, flags=0
symbind32: symname=__libc_start_main, st_value=0xf7682b1c, ndx=710, flags=0
pltenter: symname=__libc_start_main, st_value=0xf7682b1c, ndx=710, flags=0
pltenter: symname=mmap, st_value=0xf777fc5c, ndx=3064, flags=0
symbind32: symname=_dl_audit_preinit, st_value=0xf7b7b2d0, ndx=38, flags=0
pltenter: symname=_dl_audit_preinit, st_value=0xf7b7b2d0, ndx=38, flags=0
preinit
pltenter: symname=memset, st_value=0xf770fbf0, ndx=1300, flags=0
symbind32: symname=getenv, st_value=0xf76a0e1c, ndx=1900, flags=0
pltenter: symname=getenv, st_value=0xf76a0e1c, ndx=1900, flags=0
symbind32: symname=mallopt, st_value=0xf770b28c, ndx=1591, flags=0
pltenter: symname=mallopt, st_value=0xf770b28c, ndx=1591, flags=0
symbind32: symname=getopt_long, st_value=0xf774736c, ndx=1467, flags=0
pltenter: symname=getopt_long, st_value=0xf774736c, ndx=1467, flags=0
pltenter: symname=getenv, st_value=0xf76a0e1c, ndx=1900, flags=0
pltenter: symname=getenv, st_value=0xf76a0e1c, ndx=1900, flags=0
symbind32: symname=setvbuf, st_value=0xf76d49ac, ndx=1342, flags=0
pltenter: symname=setvbuf, st_value=0xf76d49ac, ndx=1342, flags=0
pltenter: symname=getenv, st_value=0xf76a0e1c, ndx=1900, flags=0
pltenter: symname=getenv, st_value=0xf76a0e1c, ndx=1900, flags=0
symbind32: symname=fork, st_value=0xf7741ab8, ndx=2327, flags=0
pltenter: symname=fork, st_value=0xf7741ab8, ndx=2327, flags=0
symbind32: symname=signal, st_value=0xf769c164, ndx=973, flags=0
pltenter: symname=signal, st_value=0xf769c164, ndx=973, flags=0
symbind32: symname=alarm, st_value=0xf773cb88, ndx=350, flags=0
pltenter: symname=alarm, st_value=0xf773cb88, ndx=350, flags=0
pltenter: symname=signal, st_value=0xf769c164, ndx=973, flags=0
symbind32: symname=waitpid, st_value=0xf7765508, ndx=2882, flags=0
pltenter: symname=waitpid, st_value=0xf7765508, ndx=2882, flags=0
symbind32: symname=setrlimit64, st_value=0xf7779db8, ndx=2349, flags=0
pltenter: symname=setrlimit64, st_value=0xf7779db8, ndx=2349, flags=0
symbind32: symname=setpgid, st_value=0xf7762740, ndx=1838, flags=0
pltenter: symname=setpgid, st_value=0xf7762740, ndx=1838, flags=0
pltenter: symname=getenv, st_value=0xf76a0e1c, ndx=1900, flags=0
symbind32: symname=dlopen, st_value=0xf76eab28, ndx=1984, flags=0
pltenter: symname=dlopen, st_value=0xf76eab28, ndx=1984, flags=0
objsearch: $ORIGIN/tst-auditmod9b.so, LA_SET_ORIG
activity: delete
symbind32: symname=__cxa_finalize, st_value=0xf769f328, ndx=232, flags=0
pltenter: symname=__cxa_finalize, st_value=0xf769f328, ndx=232, flags=0
objclose
objclose
objclose
activity: consistent

(the objopen: seems bogus)

$ cat elf/tst-audit9.out
$

$ cat elf/tst-tls-ie-dlmopen.out
maintls[1000]:   0xf7a83f88 .. 0xf7a84370
var0[480]:       0x15b8320 .. 0x15b8500 global-dynamic
var1[120]:       0x15b86a8 .. 0x15b8720 global-dynamic
var2[24]:        0x15b8f00 .. 0x15b8f18 global-dynamic
var3[16]:        0x15b90c0 .. 0x15b90d0 global-dynamic
var6[576]:       0xf7a844b0 .. 0xf7a846f0 initial-exec
The next dlmopen should fail...
...OK failed with: /home/adhemerval.zanella/projects/glibc/build/arm-linux-gnueabihf/elf/tst-tls-ie-mod4.so: cannot allocate memory in static TLS block.
Didn't expect signal from child: got `Segmentation fault'

  reply	other threads:[~2023-07-07 12:48 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 20:02 Florian Weimer
2023-07-04 20:02 ` [PATCH 01/33] support: Add <support/memprobe.h> for protection flags probing Florian Weimer
2023-07-04 20:02 ` [PATCH 02/33] misc: Enable internal use of memory protection keys Florian Weimer
2023-07-04 20:02 ` [PATCH 03/33] elf: Remove _dl_sysdep_open_object hook function Florian Weimer
2023-07-04 20:02 ` [PATCH 04/33] elf: Eliminate second loop in find_version in dl-version.c Florian Weimer
2023-07-04 20:02 ` [PATCH 05/33] elf: In rtld_setup_main_map, assume ld.so has a DYNAMIC segment Florian Weimer
2023-07-04 20:02 ` [PATCH 06/33] elf: Remove version assert in check_match in elf/dl-lookup.c Florian Weimer
2023-07-04 20:02 ` [PATCH 07/33] elf: Disambiguate some failures in _dl_load_cache_lookup Florian Weimer
2023-07-04 20:02 ` [PATCH 08/33] elf: Eliminate alloca in open_verify Florian Weimer
2023-07-04 20:02 ` [PATCH 09/33] Do not export <alloc_buffer.h> functions from libc Florian Weimer
2023-07-04 20:02 ` [PATCH 10/33] elf: Make <alloc_buffer.h> usable in ld.so Florian Weimer
2023-07-04 20:03 ` [PATCH 11/33] elf: Merge the three implementations of _dl_dst_substitute Florian Weimer
2023-07-04 20:03 ` [PATCH 12/33] elf: _dl_find_object may return 1 during early startup (bug 30515) Florian Weimer
2023-07-04 20:03 ` [PATCH 13/33] elf: Move __rtld_malloc_init_stubs call into _dl_start_final Florian Weimer
2023-07-04 20:03 ` [PATCH 14/33] elf: Merge __dl_libc_freemem into __rtld_libc_freeres Florian Weimer
2023-07-04 20:03 ` [PATCH 15/33] elf: Use struct link_map_private for the internal link map Florian Weimer
2023-07-04 20:03 ` [PATCH 16/33] elf: Remove run-time-writable fields from struct link_map_private Florian Weimer
2023-07-04 20:03 ` [PATCH 17/33] elf: Move l_tls_offset into read-write part of link map Florian Weimer
2023-07-04 20:03 ` [PATCH 18/33] elf: Allocate auditor state after read-write " Florian Weimer
2023-07-04 20:03 ` [PATCH 19/33] elf: Move link map fields used by dependency sorting to writable part Florian Weimer
2023-07-04 20:03 ` [PATCH 20/33] elf: Split _dl_lookup_map, _dl_map_new_object from _dl_map_object Florian Weimer
2023-07-04 20:03 ` [PATCH 21/33] elf: Add l_soname accessor function for DT_SONAME values Florian Weimer
2023-07-04 20:03 ` [PATCH 22/33] elf: _dl_rtld_map should not exist in static builds Florian Weimer
2023-07-04 20:03 ` [PATCH 23/33] elf: Introduce GLPM accessor for the protected memory area Florian Weimer
2023-07-04 20:04 ` [PATCH 24/33] elf: Bootstrap allocation for future protected memory allocator Florian Weimer
2023-07-04 20:04 ` [PATCH 25/33] elf: Implement a basic " Florian Weimer
2023-07-04 20:04 ` [PATCH 26/33] elf: Move most of the _dl_find_object data to the protected heap Florian Weimer
2023-07-04 20:04 ` [PATCH 27/33] elf: Switch to a region-based protected memory allocator Florian Weimer
2023-07-04 20:04 ` [PATCH 28/33] elf: Determine the caller link map in _dl_open Florian Weimer
2023-07-04 20:04 ` [PATCH 29/33] elf: Add fast path to dlopen for fully-opened maps Florian Weimer
2023-07-04 20:04 ` [PATCH 30/33] elf: Use _dl_find_object instead of _dl_find_dso_for_object in dlopen Florian Weimer
2023-07-04 20:04 ` [PATCH 31/33] elf: Put critical _dl_find_object pointers into protected memory area Florian Weimer
2023-07-04 20:04 ` [PATCH 32/33] elf: Add hash tables to speed up DT_NEEDED, dlopen lookups Florian Weimer
2023-07-04 20:04 ` [PATCH 33/33] elf: Use memory protection keys for the protected memory allocator Florian Weimer
2023-07-04 20:07 ` [PATCH 00/33] RFC: RELRO link maps Florian Weimer
2023-07-05 15:54   ` Carlos O'Donell
2023-07-05 15:57     ` Florian Weimer
2023-07-05 17:48       ` Carlos O'Donell
2023-07-05 17:58         ` Adhemerval Zanella Netto
2023-07-07 11:10           ` Florian Weimer
2023-07-07 12:42             ` Florian Weimer
2023-07-07 12:48               ` Adhemerval Zanella Netto [this message]
2023-07-07 13:18                 ` Florian Weimer
2023-07-07 13:58                   ` Adhemerval Zanella Netto
2023-07-07 14:55                     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9495eead-7153-82dc-ccf8-7e5ff089ba40@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=maxim.kuvyrkov@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).