From patchwork Thu Jan 27 13:40:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 12726814 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 86EECC433EF for ; Thu, 27 Jan 2022 13:42:10 +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=8twXQoQeiNNVfK+JMosP4jFUGyYtN3uSlqWPEcC9LIU=; b=AclT8fKYn0d+4H UCQhVDL8H38bPJBVqAy0CbwGizO+mUJ5ZkVU2Z1h3tM6sAcDIAcNx2jgzPcKWOfwo+47iI0Jdwtn7 0BwP5c3VE5OFXsvO39vMsT0+pwveqUJZLhswN909VfKnQceCJ5s8bCkaKo4GUBOV9Dn4TFwJjUfge FaZ+kNAnuIf+fVSc5ebHvUCVuYC6bv9dJ18m9JhHFY9Et3F3kOhFeCrrbTZRfhVA3ExcWI1AeCamY W7OThnIdkXugyPutBltnnxoSVz+/Zh9et6CKNCCuLlUuDaG9fbtAKjThAmoOu9v8iREAkclHDdQNp m/76u6pA9vUV1Pshrnfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD516-00FwE1-CD; Thu, 27 Jan 2022 13:40:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD511-00FwBh-3z for linux-arm-kernel@lists.infradead.org; Thu, 27 Jan 2022 13:40:44 +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 A836F1063; Thu, 27 Jan 2022 05:40:39 -0800 (PST) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DC7543F766; Thu, 27 Jan 2022 05:40:38 -0800 (PST) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Cc: maz@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, will@kernel.org Subject: [PATCH 0/4] arm64: Support of PAuth QARMA3 architected algorithm Date: Thu, 27 Jan 2022 13:40:16 +0000 Message-Id: <20220127134020.62787-1-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220127_054043_229451_1F119887 X-CRM114-Status: UNSURE ( 5.98 ) 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 QARMA3 is relaxed version of the QARMA5 algorithm which expected to reduce the latency of calculation while still delivering a suitable level of security. Feature advertised via a new ID fields in ID_AA64ISAR2_EL1 [1], so we need to teach the kernel to identify this. [1] https://developer.arm.com/documentation/ddi0601/2021-12/AArch64-Registers/ID-AA64ISAR2-EL1--AArch64-Instruction-Set-Attribute-Register-2?lang=en Thanks! Vladimir Murzin (4): arm64: cpufeature: Account min_field_value when cheking secondaries for PAuth arm64: cpufeature: Warn if mutually exclusive PAuth algorithms detected arm64: cpufeature: Mark existing PAuth architected algorithm as QARMA5 arm64: Add support of PAuth QARMA3 architected algorithm arch/arm64/include/asm/asm_pointer_auth.h | 3 ++ arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/kvm_hyp.h | 1 + arch/arm64/include/asm/sysreg.h | 13 ++++++ arch/arm64/kernel/cpufeature.c | 63 ++++++++++++++++++++++---- arch/arm64/kernel/idreg-override.c | 16 ++++++- arch/arm64/kvm/arm.c | 1 + arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 5 ++ arch/arm64/kvm/hyp/nvhe/sys_regs.c | 14 ++++++ arch/arm64/kvm/sys_regs.c | 5 ++ arch/arm64/tools/cpucaps | 6 ++- 11 files changed, 115 insertions(+), 13 deletions(-)