[PATCH] AArch64: Check kernel version for SVE ifuncs
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Mar 14 15:38:40 GMT 2024
Hi Florian,
> I generally prefer we fix the component that has the bug. With that
> approach, you'd have to to use your distribution contacts to request a
> backport.
The issue is present since SVE was added in 4.18 so it affects many kernels.
It is unlikely to be easy to backport since it relies on various other changes
to how syscalls and register state is dealt with.
Originally it was thought to be OK - and it would be if you only ever use
SVE in vectorized loops. However using a few SVE instructions everywhere
in applications breaks that model. Plus all the security features have increased
the overhead of kernel traps in recent years...
> The workaround introduces a performance hit for those users who today
> benefit from the SVE string operations, but do not suffer from the
> syscall interaction issue.
Today everybody has the performance hit of not getting the SVE memcpy
at all as it has blocked backports. For example I don't see the SVE memcpy
being used on Neoverse V1.
> In the end, it is your port, but version-based workarounds are really
> unusual for glibc.
Agreed, I'm hoping we can remove the check in a few years time when all
distros have moved to minimum kernel >= 6.2 in their supported versions.
Cheers,
Wilco
More information about the Libc-alpha
mailing list