WHR <msl0000023...@gmail.com> writes:

> I think the Debian architecture I'm using (ppc64) should still supporting
> POWER7, but apparently this library was built to use instructions unavailable
> on POWER7.

Nettle attempts to figure out at runtime which processor features are
available.

> => 0x00003fffb72bedec <+76>:    vmrgow  v4,v0,v0

The ppc specification says "vmrgow is treated as a Vector
instruction in terms of resource availability.", it's not entirely clear
to me what that means, and if checking for altivec support should be enough.

The fat setup for ppc is intended to enable the crashing code path only
if the feature bits PPC_FEATURE_HAS_ALTIVEC and PPC_FEATURE_HAS_VSX are
both set in the status word returned from

  hwcap = getauxval(AT_HWCAP);

This logic is in
https://git.lysator.liu.se/nettle/nettle/-/blob/master/fat-ppc.c#L151
and used to selct chacha code here:
https://git.lysator.liu.se/nettle/nettle/-/blob/master/fat-ppc.c#L232

> lscpu(1) output:
>
> Architecture:            ppc64
>   CPU op-mode(s):        32-bit, 64-bit
>   Byte Order:            Big Endian
> CPU(s):                  4
>   On-line CPU(s) list:   0-3
> Model name:              POWER7 (architected), altivec supported

Would you expect to have the "vsx" feature mentioned there or not?

You can get some diagnostics from the initialization process by setting
the NETTLE_FAT_VERBOSE environment variable, and override the automatic
detection with the NETTLE_FAT_OVERRIDE environment variable.

Can you check what getauxval(AT_HWCAP) returns on your system?

I'm not so familiar with powerpc variants. Cc:ing Maamoun who's more
familiar with this arch.

>   Model:                 2.3 (pvr 003f 0203)
>   Thread(s) per core:    4
>   Core(s) per socket:    1
>   Socket(s):             1
> Virtualization features: 
>   Hypervisor vendor:     pHyp
>   Virtualization type:   para

Is the program that crashes running under a vm, or is the kernel running
on the bare metal? Each layer of vm tends to be ian opportunity to introduce
errors in the list of available processor features.

> Caches (sum of all):     
>   L1d:                   32 KiB (1 instance)
>   L1i:                   32 KiB (1 instance)
>   L2:                    256 KiB (1 instance)
>   L3:                    4 MiB (1 instance)
> NUMA:                    
>   NUMA node(s):          2
>   NUMA node0 CPU(s):     
>   NUMA node1 CPU(s):     0-3
>
>
> -- System Information:
> Debian Release: bookworm/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> merged-usr: no
> Architecture: ppc64
> Foreign Architectures: powerpc
>
> Kernel: Linux 4.1.42-rivoreo-powerpc64-largepage (SMP w/4 CPU threads)
> Locale: LANG=zh_TW.UTF-8, LC_CTYPE=zh_TW.UTF-8 (charmap=UTF-8), 
> LANGUAGE=zh_TW:zh_CN:zh:en_GB:en
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages libnettle8 depends on:
> ii  libc6  2.35-3
>
> libnettle8 recommends no packages.
>
> libnettle8 suggests no packages.
>
> -- no debconf information
>

Regards,
/Niels

-- 
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.

Reply via email to