This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v1.1 0/7] aarch64: Allow overriding HWCAP_CPUID feature check
- From: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 11 May 2017 20:21:39 +0530
- Subject: [PATCH v1.1 0/7] aarch64: Allow overriding HWCAP_CPUID feature check
- Authentication-results: sourceware.org; auth=none
Hi,
This set of patches moves LD_HWCAP_MASK environment variable to tunables
as glibc.tune.hwcap_mask and gets all of its uses using tunables instead.
This is needed to override the HWCAP_CPUID bit for aarch64 to allow
disabling of the multiarch MIDR check if needed.
The patchset enhances the tunables framework further for this and as a
result, the tunable_list is now laid out in the .relro section so that it
cannot be modified after relocations have been processed. Also, tunables
can now be set to have a default value, and can also take unsigned int64
values.
I have done a sanity test of this patchset on aarch64 and seems to work
just fine. x86 would perhaps benefit from a similar delaying of
cpu_features reading for static binaries so that they can be overriden by
tunables in future (an aarch64 patch coming up; spoiler alert: the tunable
name proposed is glibc.tune.mcpu) but I haven't done that at this time
since it is not necessary for this patchset.
Update from last set:
- Fixed up removal of dl_hwcap_mask in one case I missed during rebase.
Siddhesh
Siddhesh Poyarekar (7):
tunables: Specify a default value for tunables
tunables: Add support for tunables of uint64_t type
tunables: Add hooks to get and update tunables
tunables: Add LD_HWCAP_MASK to tunables
tunables: Use glibc.tune.hwcap_mask tunable instead of _dl_hwcap_mask
Delay initialization of CPU features struct in static binaries
aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK
csu/libc-start.c | 6 ++
elf/dl-cache.c | 9 +-
elf/dl-hwcaps.c | 15 ++-
elf/dl-support.c | 2 +
elf/dl-tunable-types.h | 1 +
elf/dl-tunables.c | 142 ++++++++++++++-----------
elf/dl-tunables.h | 43 +++++---
elf/dl-tunables.list | 7 ++
elf/rtld.c | 4 +
scripts/gen-tunables.awk | 13 ++-
sysdeps/generic/ldsodefs.h | 2 +
sysdeps/sparc/sparc32/dl-machine.h | 7 +-
sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 15 ++-
sysdeps/unix/sysv/linux/aarch64/libc-start.c | 23 +---
sysdeps/x86/cpu-features.c | 4 +
sysdeps/x86/libc-start.c | 23 +---
16 files changed, 192 insertions(+), 124 deletions(-)
--
2.7.4