From patchwork Thu Aug 22 15:11:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13773693 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 521B3C52D7C for ; Thu, 22 Aug 2024 15:13:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB78580039; Thu, 22 Aug 2024 11:13:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D67598001E; Thu, 22 Aug 2024 11:13:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE12B80039; Thu, 22 Aug 2024 11:13:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9D04D8001E for ; Thu, 22 Aug 2024 11:13:06 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1DE041610D5 for ; Thu, 22 Aug 2024 15:13:06 +0000 (UTC) X-FDA: 82480224372.05.6821A6E Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf19.hostedemail.com (Postfix) with ESMTP id 802341A001A for ; Thu, 22 Aug 2024 15:13:04 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf19.hostedemail.com: domain of joey.gouly@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=joey.gouly@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724339504; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UpfNylgfxY4txd7ztue1Ar+iWBvQcIDs522zyFJSfc4=; b=rm2HdfZbd/W/SQVDxSbKFxpfVscQYb6klY8pZ8Yx//t60jBu9QJXWvgNIv5ao9xc5G/9j4 7H6mv3HhZrNO3Uj/V80cSAPKX6B0JFoV3g88DWE+0ibrwn5rkvswki5dTaKUzu/hHVEyV9 zsPwLXJBXHW9baZAl9d9N6y81KEIkdw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724339504; a=rsa-sha256; cv=none; b=a2SNuQzOJtUoBGl2C6rZrREQbkgfJYjK/HTthH8Pqije75fO9jM62ITYz4JdUKOVh4IU+P GUfoJUPsF8COvIKIMoHJjVo8zSo7lpsVfVHf3mYxJMtmWB+Ek8RVJGHsJyWNa4Iqik32ji tLbU302l+F9jiGk63hiPE821O0JI2XI= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf19.hostedemail.com: domain of joey.gouly@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=joey.gouly@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 D6BB01650; Thu, 22 Aug 2024 08:13:29 -0700 (PDT) Received: from e124191.cambridge.arm.com (e124191.cambridge.arm.com [10.1.197.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B8D833F58B; Thu, 22 Aug 2024 08:12:59 -0700 (PDT) From: Joey Gouly To: linux-arm-kernel@lists.infradead.org Cc: nd@arm.com, akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, anshuman.khandual@arm.com, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, joey.gouly@arm.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, skhan@linuxfoundation.org, szabolcs.nagy@arm.com, tglx@linutronix.de, will@kernel.org, x86@kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org Subject: [PATCH v5 23/30] arm64: add Permission Overlay Extension Kconfig Date: Thu, 22 Aug 2024 16:11:06 +0100 Message-Id: <20240822151113.1479789-24-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240822151113.1479789-1-joey.gouly@arm.com> References: <20240822151113.1479789-1-joey.gouly@arm.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 802341A001A X-Stat-Signature: zsfy1xgmcrt1zqtxa7ra595chz4wy6w7 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1724339584-130846 X-HE-Meta: U2FsdGVkX1//jWVGpLDhKGrapRgvg+tJxOhPEuN2g74zZdyoLmkN179Y56OO/ozoLhHw7rOt8vWnwt3DO/XbrqCKesocqwIVQAeUS4yjkYHy9JfAOsXtpKVVrNFom81mx13RspdtljCs0vQfK0W3RYqq9rKWWfGQrDa43rNqxCeQPq0rf+7bfMFNRCmqmH72TPfwOoJqo86YMryzZiijZNrq6e07+3K/kt63JystWLPT3uVhV7YmW72qaDAqD+HyO/a6YManZrlkE10c2vfFiwcTbAe7/g8UuVitV0fJQiKRmFD10fh7o85JA0/Ab4oujQN5eEVTYoMmBpEoHziqzVTpnVzS305BUw5Gd3GUkh3lDSsGr365m2C9tezTDDs2WpfJA7Hz8mlisHCrtOzvkVlIje6tRmBEcWodRLsg5E2NN1wznCDG2mPOSWe1k4s1pSnXQ0Oa4D4Z10V5HjLJwGfJWiBkPokrWp6sFGlsD8c6a6bLCGtEG+8kHxxgA94EPhUW2HLiZhFK1ASfyKwfYzGVzse/z1b32LS8mO5KuX4HnX7CXhQkGYdecQ+6/ezxsA1Fr8rdR5Dz1H2iIdJOg8H5RLBQBKaB5EQmx56/j+E4sXOaOG7jWbQKM/KuTR1Yxy8IBOdroWCG7Sdo8TcRvem+pcQU3eW56zsdHHZzRBq9D/JvkXviMQ+NnqBy7zLKqNcfwZwR7F815ohpDFjrEpwVeGYAsdwIHdYrqG2/3VeN0GvmuVoQDt2tZaSl4vi3R6Eh/btYsOXLY9vFca1/HOnpwhx5yVw7+3/suR+IcI0CtdVWZSijNDVz4ZQPV71xD3u+GNU8NLfo7On/z+SEcsPLldvPGDiAPx42zv8DKn7SwOS5PR1hYICS+XiCVFPlIGIt0hxYD5A7qgOVpq+cGotQCFomneqj2e56DY3KA24KZIEgIi3bqJCMV3ZA8Qdi+5tPz1SITMB6d+9o6fk boESBo27 mcU9UhJdJdJZotnmp9S1URFM7t0fHhZdnoZpqUGB/YD+h+07/LjQD8BO0NJ+HHLOlYsi3c9G5bQG84f9UcunKyZO2aoD1fkTMQGRQuy+Yzh3r1WJH0GB+vcJ6pP2A3JhJztTAiHeruHA0wT25WFNf1DmphA0l5Ob35eDkz+ejcWAFbCc7AWCb5WL4X2InF/EqIzEtiAPmkSCiYwQahAIzYDjboQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Now that support for POE and Protection Keys has been implemented, add a config to allow users to actually enable it. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Anshuman Khandual Acked-by: Catalin Marinas --- arch/arm64/Kconfig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git arch/arm64/Kconfig arch/arm64/Kconfig index a2f8ff354ca6..35dfc6275328 100644 --- arch/arm64/Kconfig +++ arch/arm64/Kconfig @@ -2137,6 +2137,29 @@ config ARM64_EPAN if the cpu does not implement the feature. endmenu # "ARMv8.7 architectural features" +menu "ARMv8.9 architectural features" + +config ARM64_POE + prompt "Permission Overlay Extension" + def_bool y + select ARCH_USES_HIGH_VMA_FLAGS + select ARCH_HAS_PKEYS + help + The Permission Overlay Extension is used to implement Memory + Protection Keys. Memory Protection Keys provides a mechanism for + enforcing page-based protections, but without requiring modification + of the page tables when an application changes protection domains. + + For details, see Documentation/core-api/protection-keys.rst + + If unsure, say y. + +config ARCH_PKEY_BITS + int + default 3 + +endmenu # "ARMv8.9 architectural features" + config ARM64_SVE bool "ARM Scalable Vector Extension support" default y