This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/6] tunables: Add LD_HWCAP_MASK to tunables
On 01/06/2017 17:12, Siddhesh Poyarekar wrote:
> Add LD_HWCAP_MASK to tunables in preparation of it being removed from
> rtld.c. This allows us to read LD_HWCAP_MASK much earlier so that it
> can influence IFUNC resolution in aarch64.
>
> This patch does not actually do anything other than read the
> LD_HWCAP_MASK variable and add the tunables way to set the
> LD_HWCAP_MASK, i.e. via the glibc.tune.hwcap_mask tunable. In a
> follow-up patch, the _dl_hwcap_mask will be replaced with
> glibc.tune.hwcap_mask to complete the transition.
>
> * elf/dl-tunables.list: Add glibc.tune.hwcap_mask.
> * scripts/gen-tunables.awk: Include dl-procinfo.h.
> * manual/tunables.texi: Document glibc.tune.hwcap_mask.
LGTM with a remark below.
> ---
> elf/dl-tunables.list | 7 +++++++
> manual/tunables.texi | 23 +++++++++++++++++++++++
> scripts/gen-tunables.awk | 1 +
> 3 files changed, 31 insertions(+)
>
> diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
> index b9f1488..41ce9af 100644
> --- a/elf/dl-tunables.list
> +++ b/elf/dl-tunables.list
> @@ -77,4 +77,11 @@ glibc {
> security_level: SXID_IGNORE
> }
> }
> + tune {
> + hwcap_mask {
> + type: UINT_64
> + env_alias: LD_HWCAP_MASK
> + default: HWCAP_IMPORTANT
> + }
> + }
LD_HWCAP_MASK is on UNSECURE_ENVVARS at sysdeps/generic/unsecvars.h, so I think
we should add a security_level: SXID_IGNORE for hwcap_mask as well.