From patchwork Thu Aug 22 15:11:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13773692 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 D6EDDC52D7C for ; Thu, 22 Aug 2024 15:13:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 59FB56B025F; Thu, 22 Aug 2024 11:13:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 527CD6B0260; Thu, 22 Aug 2024 11:13:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CA5C6B026A; Thu, 22 Aug 2024 11:13:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 1CAA96B025F for ; Thu, 22 Aug 2024 11:13:02 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C00A8C16BD for ; Thu, 22 Aug 2024 15:13:01 +0000 (UTC) X-FDA: 82480224162.30.878BB30 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf30.hostedemail.com (Postfix) with ESMTP id 2BB7F80009 for ; Thu, 22 Aug 2024 15:12:59 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf30.hostedemail.com: domain of joey.gouly@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=joey.gouly@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724339563; a=rsa-sha256; cv=none; b=O98JAfTUYZNmDAiuteqVaug2dbSfsNvY30iNkeIhxHFRbo1WEvtiq/aoIZc66Su+iSZES4 Vt1A/X2sch2R6HvbmfWP+vuyHPGsORKN8jS+brmYbZ7a0/GR7CAoiKuL8fXtrd8M8Kc10T 0xR3KZKb+SdKtxdjda7ZSjY+4oKPRoE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf30.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=1724339563; 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=bb7ZCtifyjmJorc1ZP8+hQKeVmZklK/Lz7jM+D30Hqo=; b=UsfNTMD8v6qtVqAGnpsmCnQjAzGw0i6U/sKQ+654zWCKQyvKukUznQXzhuzqtu3I9cSgvh r4NxSwAeFtV0lH60UNs3nCfwVUfToLfll4W57Q6boDScxFVdeYYADzTygYfxDK+/GcjOrX 4j6ppHxwArkSy1w0T3SPL5b61hmLHCQ= 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 893C615BF; Thu, 22 Aug 2024 08:13:25 -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 6ADCB3F58B; Thu, 22 Aug 2024 08:12:55 -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 22/30] arm64: enable PKEY support for CPUs with S1POE Date: Thu, 22 Aug 2024 16:11:05 +0100 Message-Id: <20240822151113.1479789-23-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-Rspam-User: X-Rspamd-Queue-Id: 2BB7F80009 X-Rspamd-Server: rspam01 X-Stat-Signature: i5uetkph955useiwrhm3n8933dacziso X-HE-Tag: 1724339579-511052 X-HE-Meta: U2FsdGVkX18y9K8wIBUTmj3d5K162ZAzGh5KaNKZ68qcL0nKo73SLsJHfKhXGITflv7Bn+yN/KRZ8Ffy56OnIVbFmrVjDnRpNbrjfVHjZGKcbjvIrknhX5l8IazGSNdooLCesZK36MRitcD7t12gH9GZIrOTn+9uCdr922qWVP9kO5JnGJz4cB1tfa0FsuX+BquqNJAZjylAwPh3M7nzpuO4Vw5CwoFcP98qlKavv12YNXpk3G4AIAQ/0lfIGAUhao+6JTlxyHUBrpU1PpdNgXkWIee3u3RiB0znfWPPjZkHDlfYHxbcPaEGMrwrgVgUgVVnQfRoEDR+G+BRmhFijTt0P9g2cyIMUZ8aCH8Oi25//qAbfE1D9Ykm09mRhcLnHfSY5pt+uqPP4RTv7x2Dg/b7AJF6muNISte+b1wPJ4tcoapTmrKZYAbMj0NFu4T4RsyUFZa9PI8KJl9v5UOFchq6JkfKFQfIflffSjOdcuFFmfYc1WIPViTj+/gnkZiL6R2uaDUkZvGHofTItZ1qK0fkdN2WIf1RpD33E9jd2TELWL4luE7+b7O40SdrPBn4z9zNqiCbQND2zKimONvNNGa+nkmfI9I7rtjB/7+VnvXM/akka5gj4nDZJfgZE3nvskuMG2UioQ7DgehNoChWLhtnzvjYBHzS1K6azUu154+dLlOsozib7c2VbfDD5H8iG+2TcLlwblJa5F269LZon3+Q1k2IFd5iTL7UIG7Ml26/QrU27k3AXc64+eA5mbxOLb5cTFJwGmyNEEZ+QzL0NJ5qQ3EyjVC8kVLFOcB/JPB4x816nDCwxqOxPx9f774h4Se8VQ5G/WB836Knx8rBpljCHTC70UCurK+CnBqUokcUFu8BJdG1+bo064r+NcFTRUAExWUaQnF9dPJlx3gzurJskQThLDJue/147Mm1MLvlBywnzJ2lDjx8wB1oYgNsgi554TTmJXOG/s3AvIm mxHOsfxQ Woslx6uUnnP8wNEb0IK0pHfaRWeS7xK+PpOlgwN1ojHWLVLnsMbthxfep2T1y8b7K/qevXkdwR3PvP93Iow1D6FqfPJr/5XdjIK4w1W0O/sitUfw4F4ObO4TFv5etjbpvZZXk1JLl5jBULZ3IIfrbGfFruCynrWCjddSa/LZ/4Yztvv/nKRPGQXKbJabQys7CLZ0jKKWyDt/vsnFmdc6sFd+djQ== 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 PKEYs support has been implemented, enable it for CPUs that support S1POE. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Acked-by: Catalin Marinas Reviewed-by: Anshuman Khandual --- arch/arm64/include/asm/pkeys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git arch/arm64/include/asm/pkeys.h arch/arm64/include/asm/pkeys.h index 32c352bb36b9..19eb1b12b7fc 100644 --- arch/arm64/include/asm/pkeys.h +++ arch/arm64/include/asm/pkeys.h @@ -17,7 +17,7 @@ int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, static inline bool arch_pkeys_enabled(void) { - return false; + return system_supports_poe(); } static inline int vma_pkey(struct vm_area_struct *vma)