[4/7] tunables: Add LD_HWCAP_MASK to tunables
Commit Message
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.
---
elf/dl-tunables.list | 7 +++++++
scripts/gen-tunables.awk | 1 +
2 files changed, 8 insertions(+)
Comments
On 11/05/2017 11:51, 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.
I think we should also update manual/tunables.texi with this new one.
> ---
> elf/dl-tunables.list | 7 +++++++
> scripts/gen-tunables.awk | 1 +
> 2 files changed, 8 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
> + }
> + }
> }
> diff --git a/scripts/gen-tunables.awk b/scripts/gen-tunables.awk
> index b10b00e..93e5aff 100644
> --- a/scripts/gen-tunables.awk
> +++ b/scripts/gen-tunables.awk
> @@ -134,6 +134,7 @@ END {
> print "# error \"Do not include this file directly.\""
> print "# error \"Include tunables.h instead.\""
> print "#endif"
> + print "#include <dl-procinfo.h>\n"
>
> # Now, the enum names
> print "\ntypedef enum"
>
On Wednesday 17 May 2017 02:04 AM, Adhemerval Zanella wrote:
> On 11/05/2017 11:51, 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.
>
> I think we should also update manual/tunables.texi with this new one.
OK, I'll send an updated series (minus the first two you acked) with
this change.
Siddhesh
On Wednesday 17 May 2017 12:48 PM, Siddhesh Poyarekar wrote:
> OK, I'll send an updated series (minus the first two you acked) with
> this change.
Actually on second thoughts I'll wait for you to review the remaining
patches before reposting another iteration.
Siddhesh
On 17/05/2017 06:44, Siddhesh Poyarekar wrote:
> On Wednesday 17 May 2017 12:48 PM, Siddhesh Poyarekar wrote:
>> OK, I'll send an updated series (minus the first two you acked) with
>> this change.
>
> Actually on second thoughts I'll wait for you to review the remaining
> patches before reposting another iteration.
>
> Siddhesh
>
Right, I plan to finishing up the remaining ones today or by tomorrow.
@@ -77,4 +77,11 @@ glibc {
security_level: SXID_IGNORE
}
}
+ tune {
+ hwcap_mask {
+ type: UINT_64
+ env_alias: LD_HWCAP_MASK
+ default: HWCAP_IMPORTANT
+ }
+ }
}
@@ -134,6 +134,7 @@ END {
print "# error \"Do not include this file directly.\""
print "# error \"Include tunables.h instead.\""
print "#endif"
+ print "#include <dl-procinfo.h>\n"
# Now, the enum names
print "\ntypedef enum"