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: [PATCHv4 0/2] tunables for glibc


On Wednesday 24 August 2016 12:37 AM, H.J. Lu wrote:
> It needs to be called before init_cpu_features on x86.

I've been thinking about this and it seems that init_cpu_features is
called too early and I can't call __tunables_init any earlier without
impacting what it can read, i.e. __libc_enable_secure for example.

So one approach to solving this could be to find a place in init-first
where init_cpu_features can be called early enough and still later than
__tunables_init.  I haven't done a thorough analysis but it seems it can
be done.

However a cleaner approach seems to me to be to keep the cpu features
stuff separate from the overriding and then modify the ifunc resolvers
to use the overrides if necessary.  That is, let the cpu features show
what the cpu is actually capable of and have a separate overriding
structure that is initialized later (via __init_tunables or before ifunc
resolution) and used when necessary, i.e. not used for AT_SECURE
executables or any other condition that may arise in future.

Siddhesh


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