From patchwork Fri Apr 28 13:25:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Kristina_Mart=C5=A1enko?= X-Patchwork-Id: 13226464 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E72DC77B61 for ; Fri, 28 Apr 2023 13:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9pFflu7JBLQ64r9SGtKGNmGCNhBYHhfb0zuYnlh9xZk=; b=jMyjnE3SH5uPYG mQ6IubVjUUx09zG5QTqINauQ5cqgpVL5Xj65lwlVtZ36B9iIzrBNpIT2jAWrg7pBz6yJO7LYfalLI uGtY10UK/UqII2qzPcCM7pqpi5LC1C95M3dbP5D0ERTzTvyZkQ2+bmyjIJXXKFP/wgUGJuMQdg3BH BSFVieq1gTcLf1gDXKCfWYuPcoEOdKoue7HEoavaTNLnKs3leUwKzK/4lUyPOLWwI6jj9HBATqc+q rx2PSjdZp13QoRUrnP1ZjnJVw+vk3MaK1mHHR/xR9vEMxOTTjViQ7wV/gnGXVkoJw6KVXFRkv+W4j RjIuTV+B/NU2xqljsNsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1psO8O-00AP2o-1U; Fri, 28 Apr 2023 13:27:36 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1psO8L-00AOyb-0L for linux-arm-kernel@lists.infradead.org; Fri, 28 Apr 2023 13:27:34 +0000 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 3D3AAC14; Fri, 28 Apr 2023 06:28:09 -0700 (PDT) Received: from e126864.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B49E53F5A1; Fri, 28 Apr 2023 06:27:23 -0700 (PDT) From: Kristina Martsenko To: linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon , Mark Brown , Suzuki K Poulose Subject: [PATCH] arm64: cpufeature: Fix pointer auth hwcaps Date: Fri, 28 Apr 2023 14:25:46 +0100 Message-Id: <20230428132546.2513834-1-kristina.martsenko@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230428_062733_214274_25AFE608 X-CRM114-Status: UNSURE ( 8.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The pointer auth hwcaps are not getting reported to userspace, as they are missing the .matches field. Add the field back. Fixes: 876e3c8efe79 ("arm64/cpufeature: Pull out helper for CPUID register definitions") Signed-off-by: Kristina Martsenko Reviewed-by: Mark Brown --- arch/arm64/kernel/cpufeature.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) base-commit: 4e8f6e44bce8da3b0e2df37b12839f4bc9c9cabe diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 1bdad599e769..d26a11f78b9f 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -2657,26 +2657,26 @@ static const struct arm64_cpu_capabilities arm64_features[] = { #ifdef CONFIG_ARM64_PTR_AUTH static const struct arm64_cpu_capabilities ptr_auth_hwcap_addr_matches[] = { { - ARM64_CPUID_FIELDS(ID_AA64ISAR1_EL1, APA, PAuth) + HWCAP_CPUID_MATCH(ID_AA64ISAR1_EL1, APA, PAuth) }, { - ARM64_CPUID_FIELDS(ID_AA64ISAR2_EL1, APA3, PAuth) + HWCAP_CPUID_MATCH(ID_AA64ISAR2_EL1, APA3, PAuth) }, { - ARM64_CPUID_FIELDS(ID_AA64ISAR1_EL1, API, PAuth) + HWCAP_CPUID_MATCH(ID_AA64ISAR1_EL1, API, PAuth) }, {}, }; static const struct arm64_cpu_capabilities ptr_auth_hwcap_gen_matches[] = { { - ARM64_CPUID_FIELDS(ID_AA64ISAR1_EL1, GPA, IMP) + HWCAP_CPUID_MATCH(ID_AA64ISAR1_EL1, GPA, IMP) }, { - ARM64_CPUID_FIELDS(ID_AA64ISAR2_EL1, GPA3, IMP) + HWCAP_CPUID_MATCH(ID_AA64ISAR2_EL1, GPA3, IMP) }, { - ARM64_CPUID_FIELDS(ID_AA64ISAR1_EL1, GPI, IMP) + HWCAP_CPUID_MATCH(ID_AA64ISAR1_EL1, GPI, IMP) }, {}, };