From: Marc Zyngier <maz@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
open list <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
lkft-triage@lists.linaro.org,
Linux Regressions <regressions@lists.linux.dev>,
Arnd Bergmann <arnd@arndb.de>,
Anders Roxell <anders.roxell@linaro.org>,
joey.gouly@arm.com, Oliver Upton <oliver.upton@linux.dev>
Subject: Re: gcc-8: arm64/kvm/pauth.: Error: unknown architectural extension `pauth'
Date: Mon, 22 Apr 2024 23:58:24 +0100 [thread overview]
Message-ID: <87v849t373.wl-maz@kernel.org> (raw)
In-Reply-To: <ZiYqV-5BWmPwgqbU@FVFF77S0Q05N>
On Mon, 22 Apr 2024 10:13:59 +0100,
Mark Rutland <mark.rutland@arm.com> wrote:
>
> 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@linaro.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.
This is what I've done [1]. It certainly isn't pretty, but this counts
as an incentive to drop some of the old stuff in the near-ish future.
I've pushed this out to -next, and hopefully the breakage will be
solved tomorrow.
M.
[1] https://lore.kernel.org/r/20240422224849.2238222-1-maz@kernel.org
--
Without deviation from the norm, progress is not possible.
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
open list <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
lkft-triage@lists.linaro.org,
Linux Regressions <regressions@lists.linux.dev>,
Arnd Bergmann <arnd@arndb.de>,
Anders Roxell <anders.roxell@linaro.org>,
joey.gouly@arm.com, Oliver Upton <oliver.upton@linux.dev>
Subject: Re: gcc-8: arm64/kvm/pauth.: Error: unknown architectural extension `pauth'
Date: Mon, 22 Apr 2024 23:58:24 +0100 [thread overview]
Message-ID: <87v849t373.wl-maz@kernel.org> (raw)
In-Reply-To: <ZiYqV-5BWmPwgqbU@FVFF77S0Q05N>
On Mon, 22 Apr 2024 10:13:59 +0100,
Mark Rutland <mark.rutland@arm.com> wrote:
>
> 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@linaro.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.
This is what I've done [1]. It certainly isn't pretty, but this counts
as an incentive to drop some of the old stuff in the near-ish future.
I've pushed this out to -next, and hopefully the breakage will be
solved tomorrow.
M.
[1] https://lore.kernel.org/r/20240422224849.2238222-1-maz@kernel.org
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-04-22 22:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 8:34 gcc-8: arm64/kvm/pauth.: Error: unknown architectural extension `pauth' Naresh Kamboju
2024-04-22 8:34 ` Naresh Kamboju
2024-04-22 9:13 ` Mark Rutland
2024-04-22 9:13 ` Mark Rutland
2024-04-22 9:25 ` Arnd Bergmann
2024-04-22 9:25 ` Arnd Bergmann
2024-04-22 9:40 ` Mark Rutland
2024-04-22 9:40 ` Mark Rutland
2024-04-22 12:11 ` Arnd Bergmann
2024-04-22 12:11 ` Arnd Bergmann
2024-04-22 17:20 ` Mark Rutland
2024-04-22 17:20 ` Mark Rutland
2024-04-22 18:44 ` Arnd Bergmann
2024-04-22 18:44 ` Arnd Bergmann
2024-04-22 22:58 ` Marc Zyngier [this message]
2024-04-22 22:58 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v849t373.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=joey.gouly@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=mark.rutland@arm.com \
--cc=naresh.kamboju@linaro.org \
--cc=oliver.upton@linux.dev \
--cc=regressions@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.