Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2130354lqt; Mon, 22 Apr 2024 02:14:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXbdVg2KaF2yUyoCuETLn3KpC0zsnMDnZ61T6gQQSmTOR3ewcO84/aNgnfBflceRz+DFhIK/QPrIEwqekZg/8TBqISghMWlAGRJLiQQ1g== X-Google-Smtp-Source: AGHT+IF3CJsCDe83yfEoIMDGlQapvy98vzGFJSf8ZYZSmt3i5HHSjNj72Vs6C9DFZg7lH+6Q1+RE X-Received: by 2002:ac2:4e93:0:b0:517:8ad8:c64 with SMTP id o19-20020ac24e93000000b005178ad80c64mr4844722lfr.21.1713777257935; Mon, 22 Apr 2024 02:14:17 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bq5-20020a056402214500b00570234db3c2si5389962edb.688.2024.04.22.02.14.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 02:14:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-153072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A56761F2480B for ; Mon, 22 Apr 2024 09:14:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85A19524A0; Mon, 22 Apr 2024 09:14:09 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5134753E12 for ; Mon, 22 Apr 2024 09:14:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713777249; cv=none; b=VQ1sxQmP3Jcx3UmjQRZ5GI6H5FhCgLjTVBN73xj/A+reS3xjJpronM059Wb4YXjiG+ai6rH9MfFCY4qt3kVkjK7pCGpghNbHLD18McJadTs9SXv0hUQcOvMhM3pc7iyRLI7UXp2Rm0ojCBi9jxf0qjNzKmUCIAdYGoyjI4jL9ZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713777249; c=relaxed/simple; bh=bSB47jiEPbjn+2RJwxgCUv2A6TZ3BEAuszXFpzjGwdE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XqHJDSxWp5RXb2ep/q7894ubxLj6OqmO7m+xaDV6rHykdwMdnQzoodt86rrpSkQTnpnZIVqDmvG6yX5uCY4DettFp/zBmROIzfHk01oAUPohaaQ0godWOuN6Htbj9qb6CsKhBfrSe7X4pIoqfh8wWwLjZNdF3An/huZIgf2X6jU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 19D1F339; Mon, 22 Apr 2024 02:14:35 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.21.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE2253F64C; Mon, 22 Apr 2024 02:14:04 -0700 (PDT) Date: Mon, 22 Apr 2024 10:13:59 +0100 From: Mark Rutland To: Naresh Kamboju Cc: open list , Linux ARM , lkft-triage@lists.linaro.org, Linux Regressions , Arnd Bergmann , Anders Roxell , Marc Zyngier , joey.gouly@arm.com, Oliver Upton Subject: Re: gcc-8: arm64/kvm/pauth.: Error: unknown architectural extension `pauth' Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > 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 >