Hi,

On 2024-11-01 12:01, Bastien Roucariès wrote:
> Le vendredi 1 novembre 2024, 11:57:17 UTC Aurelien Jarno a écrit :
> Hi aurelien,
> > control: severity -1 wishlist
> > 
> > Hi,
> > 
> > On 2024-10-31 11:24, Bastien Roucariès wrote:
> > > Package: libc6-dev
> > > Version: 2.40-3
> > > Severity: normal
> > > Tags: upstream
> > > 
> > > Dear Maintainer,
> > > 
> > > Newer hwcap/hwcap2 are not in sync for arm* particularly arm32 (including 
> > > crc32
> > > flags) 
> > 
> > The hwcap mechanism has been deprecated in glibc 2.33 in favor of the
> > glibc-hwcaps mechanism, and removed in glibc 2.37. Instead of relying on
> > a huge number of CPU feature combinations, the new mechanism is based on
> > architecture baseline level.
> > 
> > That said support for the glibc-hwcaps mechanism has only been added on
> > powerpc, s390 and x86-64. I don't think there is any interest in
> > standardizing the architecture baseline level on arm32.
> 
> We need in fact to get the #define HWCAP2_CRC32 (1 << 4)
> for  masking unsigned long getauxval(unsigned long type);
> 
> HWCAP_NEON is defined by including  #include <sys/auxv.h>
> but no HWCAP2_...
> 
> This is for me a bug on header.

Thanks for the details, i have updated the bug title to make clear it is
about the <bits/hwcap.h> and not the hwcaps mechanism.

For arm64 <bits/hwcap.h> is pretty up-to-date, it only misses
HWCAP2_POE which has will appear in the not yet released 6.12 kernel.
You will have to wait that this kernel is released before this can be
accepted in upstream glibc.

For arm32 <bits/hwcap.h> indeed misses the HWCAP2 flags that are all
related to armv8 crypto extensions, in other words they are only
available when running armel or armhf on a 64-bit CPU. In that case it
might just be better to run a 64-bit userland.

> CRC32 detection for arm32/arm64 get about 400 pages on debian sources, so 
> glibc-hwcaps  is may be needed for arm*

For arm64 HWCAP2_CRC32 is already defined. How many are relevant to
arm32?

All that said, I'll look at at submitting that upstream, in the meantime
you can just use the <asm/hwcap.h> kernel header directly.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                     http://aurel32.net

Attachment: signature.asc
Description: PGP signature

Reply via email to