This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Arm's SVE PCS and LD_AUDIT support?


On 01/02/2020 03:37, Carlos O'Donell wrote:
> Szabolcs,
> 
> One of the things I want to refactor is to move some of the LD_AUDIT
> support up a level inside the dynamic loader and have it depend
> less on the lazy-binding semantics.
> 
> I want only la_pltenter() and la_pltexit() to be affected by the
> binding semantics, but today because lazy was the default, we aren't
> there yet.

iirc currently any load time bound pltgot entries
will not go via plt hook of ldaudit because it
uses the same entry mechanism as lazy binding
(plt0 jumps to GOT[2]) so vpcs is not using ld
audit now.

will that change?

> Florian and I were wondering if we couldn't implement the following:
> 
> - Leave PLT in place for SVE PCS but unused.
> 
> - Enable full save-restore in plt enter/exit conservatively for
>   STO_AARCH64_VARIANT_PCS if LD_AUDIT is in use, possibly routing
>   those symbols to a different _dl_profile_fixup_full_save?
> 
> Would that work? 

i don't understand what is the new ld audit mechanism
for hooking into the plt if not GOT[1] & GOT[2].

when the vpcs abi was designed we were thinking about
adding a second entry point somewhere (e.g.
DT_AARCH64_VPCS_PLT and DT_AARCH64_VPCS_PLTGOT)
instead of using GOT[1] as PLTGOT initializer which
then jumps to GOT[2], variant_pcs symbols could
use a different entry point which can do whatever
it takes to make lazy binding work.

but it seemed a bit too much hassle for something
we don't really plan to use (bind now for vpcs is
good enough) and in principle the entry point can
handle variant_pcs and normal symbols differently,
it's just ugly because checking for the STO_*
symbol table flag at runtime has to happen in
asm since we don't know the pcs yet.

adding such second entry is still possible, or
the ld audit hook can do something ugly in asm.

if you can distinguish normal and vpcs syms in
the hook then i see no problem doing ld audit,
but the struct where the register state is saved
need to be scalable (currently exposed to the
user in the plt callbacks).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]