From patchwork Fri Nov 24 16:35:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13467932 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 237ACC61DF4 for ; Fri, 24 Nov 2023 16:36:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9E366B0303; Fri, 24 Nov 2023 11:36:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E50946B0306; Fri, 24 Nov 2023 11:36:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CC87B6B0308; Fri, 24 Nov 2023 11:36:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B090E6B0303 for ; Fri, 24 Nov 2023 11:36:06 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 893D3B6363 for ; Fri, 24 Nov 2023 16:36:06 +0000 (UTC) X-FDA: 81493399932.20.702B7DF Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf08.hostedemail.com (Postfix) with ESMTP id F02F6160009 for ; Fri, 24 Nov 2023 16:36:04 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf08.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=1700843765; 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=shn4ZiqQnA41LIKXqkASP05s2bgSOgli/Y/HyPBK1vU=; b=t9unUR4WFnqV1WeaPlyX4SY4aN8Iz9FigiyIP8SazLJ20TVfUxG86DY4RXg+DV5avLRgdg dJQi+123oUPA6isldfaU0jd7UBMVr7gy7pZODNAWbe5eMHfQTmGQcyTvXUlKRzVLKk86l4 zrVNt1gJbbCCoRw/9FI9t/x6Ohe3BUU= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf08.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=1700843765; a=rsa-sha256; cv=none; b=Z1ZpKGcoYWuH4cIBLpoa4IKLEpI4IzTbJBiKCe2ckvI79hqS4AY0QRbLlbYBqFPjnIT5XC 72o0LjQtyeXIwQYKksDreyO/Q5/StrHsLrgM4q9Gh5msAJ2gYQxV3Cr0zU3J1J06RzgJ5a wAjVh9L02+4rfj8QQh+htu3MWCsIj/c= 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 ABDAD1C01; Fri, 24 Nov 2023 08:36:50 -0800 (PST) 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 07E683F73F; Fri, 24 Nov 2023 08:36:01 -0800 (PST) From: Joey Gouly To: linux-arm-kernel@lists.infradead.org Cc: akpm@linux-foundation.org, aneesh.kumar@linux.ibm.com, broonie@kernel.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, joey.gouly@arm.com, maz@kernel.org, oliver.upton@linux.dev, shuah@kernel.org, will@kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, James Morse , Suzuki K Poulose , Zenghui Yu Subject: [PATCH v3 17/25] arm64: enable POE and PIE to coexist Date: Fri, 24 Nov 2023 16:35:02 +0000 Message-Id: <20231124163510.1835740-18-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231124163510.1835740-1-joey.gouly@arm.com> References: <20231124163510.1835740-1-joey.gouly@arm.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: F02F6160009 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: jk1ao5554aqsknj317hg65jbhr3msg16 X-HE-Tag: 1700843764-503644 X-HE-Meta: U2FsdGVkX1+mNs9H2FW2w+rRstohZqdvggVsdW27Go1bXzzZcfGD0COcENyF8Wb2qLGtIjKj/W14g7pwNhG4/QhxOl5d0G0yfcrL1gj1C9GwwJfaP3YWO0vNSaKzaCOLx4+cyiiK7ABFNqMHYP5FrSe385PwbaRAIVkDtd1iY/vR8L04NYzOEQ7QVosuncyN65A3dH748UbcZRab+3JwBBXDAi8ODiB9iFKqwgLFblQR4STajKNh8woB3DyqKHrwdo6X9oywSEDjvWOXVU0pkrk8y891m6ISN3Exy4abgzpDKRkli+2USwE/wPm084wuAuvtMX7LXnsu7Kgs6Y//Bt+LLN3VOsgEL9GVPV6j5I624eiHcWQmR7femJrmEjid+wiBh+22vNQnCs3N4xWynj5mSMjY9PxFDPjIdox/lS9xN4Rg2s/nqt9IO1bsgocOQHYC8BreOXgugxSJ2GgAcfdTIIHHUdYZKbCWt+ITGscWCOi/TWnnGVb5y5MNDjRQU74jbMFLHBPR7av1fEa5ZCFKgFkeB/anvLsQyXPw/hjg5qUWR6rR49vur4IpFDfhwOZ+54vZhWlZ4yB7HoM7WVUpqQwfrYjafo4A3aXg5+mTxcxUgKJvIBo5QuVrklMUxLTqQjC5N3KXlN4p+lbZUkclm4nsPiUL91kc+K/2mHuOmJj7P2CiRRnXSMWOwW/34cOg45blomfq4vLwgpCJjXRorWjcAI78BLXwCMdWF8vcxVqQXvzAdFDJ91hDM8e3adQBeIzG2eZMbVq2NCrjXgGVXOfP+HsKsdy1yZeOmj4QfBJKHINzULbDk8zMm060nMMi9cIBQN7mjFVmqKY/0+VLgStqt59abE23sV5O7F/ePwHDAF7zWZKFPcnGCxI4Z8eXmXkCvJ0rKw7N6OGblCHdpQQ8ThyiziCybvDmCBqfsk3ZKTORkGyL5oc+TSKzkb7Ia6KfVdwHEJTncD6 AY0GFSPg 9mE+P6mO80LcZRKmLTmBQa3XjgyH4RNqkcrRCV98gjyKZHO+9zlU1IQPsu+93BvwK8hvrkvMXI6vbU7bGaru6s7eCdEnmToADTHwz8rz5kzEdRqwJU09QiknxOwMWpI6z7bjgHDq0pUi5SFIRkOsmNpqSFhQ1oAH19lQ2pSzKjshWW0+phGP6Bcs0GQihLtF+A5IkAekGdO2F2vpBnJ/HcAz3Kg== 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: Set the EL0/userspace indirection encodings to be the overlay enabled variants of the permissions. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/pgtable-prot.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h index e9624f6326dd..3007208e04aa 100644 --- a/arch/arm64/include/asm/pgtable-prot.h +++ b/arch/arm64/include/asm/pgtable-prot.h @@ -137,10 +137,10 @@ extern bool arm64_use_ng_mappings; #define PIE_E0 ( \ PIRx_ELx_PERM(pte_pi_index(_PAGE_EXECONLY), PIE_X_O) | \ - PIRx_ELx_PERM(pte_pi_index(_PAGE_READONLY_EXEC), PIE_RX) | \ - PIRx_ELx_PERM(pte_pi_index(_PAGE_SHARED_EXEC), PIE_RWX) | \ - PIRx_ELx_PERM(pte_pi_index(_PAGE_READONLY), PIE_R) | \ - PIRx_ELx_PERM(pte_pi_index(_PAGE_SHARED), PIE_RW)) + PIRx_ELx_PERM(pte_pi_index(_PAGE_READONLY_EXEC), PIE_RX_O) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_SHARED_EXEC), PIE_RWX_O) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_READONLY), PIE_R_O) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_SHARED), PIE_RW_O)) #define PIE_E1 ( \ PIRx_ELx_PERM(pte_pi_index(_PAGE_EXECONLY), PIE_NONE_O) | \