This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/6] aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Siddhesh Poyarekar <siddhesh at sourceware dot org>, libc-alpha at sourceware dot org
- Cc: nd at arm dot com, adhemerval dot zanella at linaro dot org, sellcey at cavium dot com
- Date: Wed, 07 Jun 2017 16:00:38 +0100
- Subject: Re: [PATCH 4/6] aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK
- Authentication-results: sourceware.org; auth=none
- Authentication-results: cavium.com; dkim=none (message not signed) header.d=none;cavium.com; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- References: <1496347928-19432-1-git-send-email-siddhesh@sourceware.org> <1496347928-19432-5-git-send-email-siddhesh@sourceware.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 01/06/17 21:12, Siddhesh Poyarekar wrote:
> Now that LD_HWCAP_MASK (or glibc.tune.hwcap_mask) is read early enough
> to influence cpu feature check in aarch64, use it to influence
> multiarch selection. Setting LD_HWCAP_MASK such that it clears
> HWCAP_CPUID will now disable multiarch for the binary.
>
> HWCAP_CPUID is also now set in HWCAP_IMPORTANT so that it is set by
> default. With this patch, this feature is only usable with
> dyanmically linked binaries because LD_HWCAP_MASK is not read for
> static binaries. A future patch fixes that.
>
> * sysdeps/unix/sysv/linux/aarch64/cpu-features.c
> (init_cpu_features): Use glibc.tune.hwcap_mask.
> * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h: New file.
> ---
> sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 10 +++---
> sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h | 44 ++++++++++++++++++++++++++
> 2 files changed, 50 insertions(+), 4 deletions(-)
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h
>
OK if the new HWCAP_IMPORTANT does not cause
additional open/stat/.. syscalls (please verify
that the lib search path is not increased by
running something like
strace -E LD_PRELOAD=foobar.so /bin/true
and counting the failed syscalls)
(if the search path is increased then i'd like
to know what is the purpose of that feature)