Re: [PATCH v3] AArch64: Add ifunc masking tunable
Yury Khrustalev <[email protected]> Fri, 24 Jul 2026 09:26:34 +0100
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jul 23, 2026 at 07:28:32PM +0000, Wilco Dijkstra wrote: > Hi Yury, > > > The 'glibc.cpu.hwcaps' tunable is documented in the Glibc manual with > > this note: > > > >� This tunable is specific to i386, x86-64, s390x, powerpc and > >� loongarch. > > > > Now in this patch we are adding support for aarch64 but in a way that > > does not follow what is documented for other targets. This might result > > in confusion. Maybe we should add a comment to the manual that this > > tunable is partially supported on aarch64 but only allows to turn off > > some hwcaps and only those that don't affect security? > > I'm not sure what you mean - it uses the exact same infrastructure, callbacks > etc. As for all targets, what settings are supported is target specific, including > what hwcap settings could be changed, enabled or disabled. In all cases > unsupported features are silently ignored. So what is different here? My impression was that the 'glibc.cpu.hwcaps' tunable is supposed to use the same identifiers 'yyy' as are used in the 'HWCAP_YYY' constants just lower-case, and that it is possible that not every 'HWCAP_YYY' name will be supported or have effect. But in this case we use 'midr' and 'zva'. I agree this is a slight distinction, and given that these names depend on the target, it's fair to say the tunable works in the same way as on other targets. Still, I think we should change the manual to mention that this tunable also works in some way on aarch64 (because other supporting targets are mention there). > >> +����� if (tunable_str_comma_strcmp_cte (&n, "midr")) > > > > Should this (and similar values below) be '-midr' with the '-' used to > > make sure we only support disabling? > > No, that's not how it works. Yes, my bad, I overlooked the 'if (!n.disable)' part. So, apart from manual update, this patch LGTM and should go in as soon as release branch is created. Reviewed-by: Yury Khrustalev <[email protected]> Thanks, Yury