[PATCH] KVM: arm64: nv: Work around lack of pauth support in old toolchains

Marc Zyngier maz at kernel.org
Tue Apr 23 05:06:25 PDT 2024


On Tue, 23 Apr 2024 13:00:55 +0100,
"Aiqun Yu (Maria)" <quic_aiquny at quicinc.com> wrote:
> 
> 
> 
> On 4/23/2024 4:24 PM, Arnd Bergmann wrote:
> > On Tue, Apr 23, 2024, at 00:48, Marc Zyngier wrote:
> >> We still support GCC 8.x, and it appears that this toolchain
> >> does not understand "pauth" as a valid architectural extension.
> >> After all, it's only been 8 years since ARMv8.3 was released...
> > 
> > Just to clarify: I'm fairly sure that all supported toolchains
> > support ARMv8.3 and PACGA, the problem with ".arch_extension pauth\n"
> > seems to be that it was retroactively made an optional
> > feature for earlier architecture versions a few years after
> > ARMv8.3, so most binutils versions we support understand
> > pacga as an armv8.3 feature but reject the pauth name for the
> > extension.
> Kind of agree with Arnd here.
> Shall the fix just remove the ".arch_extension pauth"?
> 
> I've tried gcc 7 failed with the pauth name for the extension.
> After I remove the ".arch_extension pauth" and use "pacga" instruction
> directly pass the gcc 7 compilation.

And breaks with LLVM:

  CC      arch/arm64/kvm/pauth.o
arch/arm64/kvm/pauth.c:40:9: error: instruction requires: pauth
                     "pacga %0, %1, %2" : "=r" (pac) : "r" (ptr), "r" (mod));
                      ^
<inline asm>:2:1: note: instantiated into assembly here
pacga x19, x1, x9
^
1 error generated.


	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list