lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 22 Apr 2024 10:13:59 +0100
From: Mark Rutland <mark.rutland@....com>
To: Naresh Kamboju <naresh.kamboju@...aro.org>
Cc: open list <linux-kernel@...r.kernel.org>,
	Linux ARM <linux-arm-kernel@...ts.infradead.org>,
	lkft-triage@...ts.linaro.org,
	Linux Regressions <regressions@...ts.linux.dev>,
	Arnd Bergmann <arnd@...db.de>,
	Anders Roxell <anders.roxell@...aro.org>,
	Marc Zyngier <maz@...nel.org>, joey.gouly@....com,
	Oliver Upton <oliver.upton@...ux.dev>
Subject: Re: gcc-8: arm64/kvm/pauth.: Error: unknown architectural extension
 `pauth'

On Mon, Apr 22, 2024 at 02:04:43PM +0530, Naresh Kamboju wrote:
> The arm64 defconfig build failed with gcc-8 and passed with gcc-13.
> 
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> 
> Build log:
> ---
> /tmp/ccSUNNZy.s: Assembler messages:
> /tmp/ccSUNNZy.s:3159: Error: unknown architectural extension `pauth'
> make[5]: *** [scripts/Makefile.build:244: arch/arm64/kvm/pauth.o] Error 1
> 
> Steps to reproduce:
> ---
> # tuxmake --runtime podman --target-arch arm64 --toolchain gcc-8
> --kconfig defconfig

I think the key thing here is GCC 8; the associated assembler won't necessarily
have ARMv8.3-A support, since all the relevant bits got added around GCC 9.

Looking at the commits, I think this is broken since its introduction in commit:

  6ccc971ee2c61a1f  ("KVM: arm64: nv: Add emulation for ERETAx instructions")

.. where the pauth.c file only depends on ARM64_PTR_AUTH (which doesn't imply
AS_HAS_ARMV8_3), but in the file we do:

  asm volatile(ARM64_ASM_PREAMBLE ".arch_extension pauth\n"
               "pacga %0, %1, %2" : "=r" (pac) : "r" (ptr), "r" (mod));

Given the minimum supported toolchain comes with an assembler that doesn't
necessarily support ARMv8.3, I reckon we'll either have to make NV pauth
support depend upon AS_HAS_ARMV8_3, or manually assemble the PACGA instruction.

I suspect the latter is the better option.

Mark.


> 
> Links:
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240422/testrun/23551634/suite/build/test/gcc-8-defconfig/details/
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240422/testrun/23551634/suite/build/test/gcc-8-defconfig/log
>   - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fRe0ZWWmise7cetIz0aXdnq4jJ/
> 
> --
> Linaro LKFT
> https://lkft.linaro.org
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ