* H. J. Lu via Libc-alpha: > On Mon, Dec 21, 2020 at 5:00 AM Florian Weimer wrote: >> >> I finally had some time to review the interface. >> >> I have two major concerns: >> >> (a) Placement of struct cpu_features in _rtld_global_ro >> >> This means that backporting new feature support changes the internal >> GLIBC_PRIVATE ABI. Consequently, there's a race condition during >> in-place updates where loading binaries can fail in obscure ways, due to >> the change in _rtld_global_ro offsets. We should really avoid this. > > This applies to all members in _rtld_global_ro. Correct, it's always a trade-off backporting something that changes the offsets. We can avoid this by using an indirection. I'd also like to avoid reliance on the preprocessor and switch to a compressed bit array, without a function call. This will allow automation of binding generation for other languages, and eventually a special relocation could be used to initialize the pointer and length early. The last part would enable use in IFUNC selectors. I've attached a draft version of the installed header (obviously untested). For the time being and uses in libc.so.6, we can generalize the existing _dl_var_init mechanism, but apply this before relocation, right after we recognize that we have loaded libc.so.6 in _dl_map_object_from_fd. Something like this is also needed to fix bug 20802. I'm slightly behind with implementing this, though. Thanks, Florian -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill