Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2602138lqt; Mon, 22 Apr 2024 16:15:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWLXBHVcdVylJhTnafWE0yQHfYoCxbRpSijbkVzhP2HCOGxMs9l4NW5Tl9MSUMhQzkH0h1GjhQbVbVArKtUNXqtUVUAxw+JfVpurlnpnQ== X-Google-Smtp-Source: AGHT+IGpKsYxmPVX6Z09qLkLFZ2P78kLAn3Sm2lw6UkvoKP+lLnHsS3+pWsaEzOvvaWXT1WZfCuM X-Received: by 2002:a05:6871:a6a0:b0:238:f93f:66b6 with SMTP id wh32-20020a056871a6a000b00238f93f66b6mr16501100oab.29.1713827723744; Mon, 22 Apr 2024 16:15:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713827723; cv=pass; d=google.com; s=arc-20160816; b=hKLXJLA5QDIQOLIQWZvycFH9aUPL2aFoVmffaQ+hCfgyV4elG/HBaK7rnkepDCLKSP D3hms7udII8RvtXAuZB/EKUKXQExgAcdLpSvhV8ffTvOwXnLAdGpqTig3Lb3jazjfn7+ bISAEsrwpN/wZBI+FqpqhuJ32HJMVzeCMjtRAS9nG97cRNFFdaXH+qD3rr9dsx+uLENZ rJda5Npzac3gYAHlAqXA2iTyuI2xX3NyRd+4s+uO28ml3DRhLdwjHktCy/veGCwfIaNI tKdH2xJz9Sm995H2V7+9hAYSCNu4AJA4jUPYe+Y8wooiOhNMVIA64K0aLTgVKXckZIH5 2Qvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=XoAKz9YLLRm5Qx8bhsmnnDBx+eK151uqEIyYSYSaChM=; fh=/DzdN6rE6gWlupr/81+8k4gwWzepXKm7qb3X30azzMI=; b=YcPl0MwHUrupGptOd3n8l0fHDiToCAIwFjzzDY8xsCjlat6LrocNujM9ROiBLrmNT4 O7GVQM98M8dABSe/+e+7meQjJLl5O51FxeqT2MFIIKjFHISr9Z/AccimB075DZHwC45F MZ6bLwWJLOmhen+VSoyK81zFEtTkBZHGp3JjxU4fz9C/MyCNqMBLL5Zzqw/ILrsXu0kv ciy43GDWvrtG6RyRZBWRT3/l0gEVw4WIDE6QvRzZ29+ZJyV7Sx27N9AkZTUguw82w83Y QL13JzHeih4A4LsrbDEPhWeZUBd6HXpZ2WcWYJpPrmfiJgA2fUsmBBC0E6sYPw0ArhzW J+MA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xhnpmzsb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154172-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o18-20020a656a52000000b005f41aef11c5si4016242pgu.528.2024.04.22.16.15.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 16:15:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154172-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xhnpmzsb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154172-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 23C1C284414 for ; Mon, 22 Apr 2024 23:07:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5EB11BF6C5; Mon, 22 Apr 2024 22:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xhnpmzsb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D59DC1BED91; Mon, 22 Apr 2024 22:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713826716; cv=none; b=mdIVyx23hJSi5ZfYqgTgC7Sc/0Sp8D/jTO/hEneQ27++IAyFFJCBi2FdlfbLv0uxPBMNVppIcSUjWGQTm58VvfYrzAzFI9pglZ1kD7Vog49jRUgQ8F43208jHrq5gxyFgwLHFmB4cDiAgHMKwLma+T7YUzPUCDFbTXAYbbzegJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713826716; c=relaxed/simple; bh=esn2V8XOCiYcLyvtAXzH1iAi1DKCTXra+1968f985U0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=oil+xVEirbRA+ltGZwVZOEPOEw2ad2cdttr3ZvypggaEiSrL1pNtpg/kWjgvwEMjjWmt84iGQZqtUUiMdx5R3A87jRa39gxRiEVGieRUzjvkWLDpmgPg38eESTnu4o8kmwd64t0fOcUKl7WxBp9epFmwlKxWhoyLLJyorBWviAk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Xhnpmzsb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 522B7C3277B; Mon, 22 Apr 2024 22:58:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713826716; bh=esn2V8XOCiYcLyvtAXzH1iAi1DKCTXra+1968f985U0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Xhnpmzsbf9Mri1AICNzleKpdSdPcQM5uzRQQr6iR5Ef1rAs0QixfSV42TtZ8JSz93 2d9+wvFcvU+BcSqYnIvPJT8mpS8NaxX5w+AwVQn45OolfkGaJ8xEiVTaptQY9uSpSJ aM2YqKzG8KsdDS/FHCrD7Nenfbnyobf7qjaRWU02SgL3g0AW9JVgLMixb0mO+Wk/Ac Wh0/OHnim4+ajVdvalr1HuwwLmkPYb8KoY1rLQFaHkrBcnFIHa8sEy1jTgKJaabvzm 9UvJfmAjVcOKNQziosCGWJgX2WHCybSDAHdSC8EYpzTcc6h1v/PEdplArJDMwI7FBt 0+ckEQ6kn0mGg== Received: from [12.161.88.66] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rz2cL-006yKr-Kz; Mon, 22 Apr 2024 23:58:34 +0100 Date: Mon, 22 Apr 2024 23:58:24 +0100 Message-ID: <87v849t373.wl-maz@kernel.org> From: Marc Zyngier To: Mark Rutland Cc: Naresh Kamboju , open list , Linux ARM , lkft-triage@lists.linaro.org, Linux Regressions , Arnd Bergmann , Anders Roxell , joey.gouly@arm.com, Oliver Upton Subject: Re: gcc-8: arm64/kvm/pauth.: Error: unknown architectural extension `pauth' In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 12.161.88.66 X-SA-Exim-Rcpt-To: mark.rutland@arm.com, naresh.kamboju@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lkft-triage@lists.linaro.org, regressions@lists.linux.dev, arnd@arndb.de, anders.roxell@linaro.org, joey.gouly@arm.com, oliver.upton@linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Mon, 22 Apr 2024 10:13:59 +0100, Mark Rutland 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 > > > > 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.