From mboxrd@z Thu Jan 1 00:00:00 1970 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 56A36C7EE24 for ; Tue, 6 Jun 2023 15:00:30 +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:References:In-Reply-To: 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: List-Owner; bh=OhTJnNfk8egB8ne6fENs4EGb510goM3T1ykByUBF7h4=; b=ISXG/jwv8HAb2/ 688Rglh654Z7bQUiEPDUlYQ5eJTSu3NQPSo7q/Iz1RH7fI9hM57aL0hFPgiqNSn3/Pr5TzC5a7gCZ HBLHq3PQNsRRfKJVOK61QADsVc+2UDb3pCbsEJFGY+5aKQ9C2vNHjklwEmVatWbh32KtkBgk6HASa Tjw08zDCLEL8dpd01jVz6t51M1ThHPizRqyxmIkpO9fAoUNDQMAG41VhYMgdKDKL0jh4eg5CqMNhk kv5t13os6brhrsSOg4dGSDDnGCs1ObejAeGG2vjmngJVXRmEk3+6QlHsQQcRIW7Q/aVtwdVQZypUI SAKevcSW1gJp2CIWPV1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6YA5-0028v3-0b; Tue, 06 Jun 2023 14:59:53 +0000 Received: from mail-vi1eur05on20627.outbound.protection.outlook.com ([2a01:111:f400:7d00::627] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6Y9q-0028hk-0W for linux-arm-kernel@lists.infradead.org; Tue, 06 Jun 2023 14:59:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=azbLkUxrEBUfEW0KoJGkOs75usQXd9T0VSQpPuCpIKw=; b=8kkyPztq7TT833w24A+oLmFttTA/qKpVbDaPIVQQELJEkjYZECxacmJGJ0FVRlcLDDvf0vMNoHvMVhIbjoot4xccQZ55lGs49mSHilN49e9yDx2SxH/qdcOLw7Jvu5PEs2lOodxT6tk7+QRwCHXg1NlildGjT6lboS7q5gn7uzw= Received: from DB8P191CA0013.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::23) by AS1PR08MB7475.eurprd08.prod.outlook.com (2603:10a6:20b:4dd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.31; Tue, 6 Jun 2023 14:59:28 +0000 Received: from DBAEUR03FT065.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::3) by DB8P191CA0013.outlook.office365.com (2603:10a6:10:130::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33 via Frontend Transport; Tue, 6 Jun 2023 14:59:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT065.mail.protection.outlook.com (100.127.142.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19 via Frontend Transport; Tue, 6 Jun 2023 14:59:28 +0000 Received: ("Tessian outbound 945aec65ec65:v136"); Tue, 06 Jun 2023 14:59:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6d106b73ec01b337 X-CR-MTA-TID: 64aa7808 Received: from 477c35251b80.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EC5AB6A5-6781-459C-ADAC-4503E17CA1D0.1; Tue, 06 Jun 2023 14:59:21 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 477c35251b80.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 06 Jun 2023 14:59:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HmsXXISMeVbYzphCcFpEyLS6kwC7aT0cDF7x0zAt5VwfS+GTmfmTVwmKQunL/avk7wUZnIbHAZzKkDF67Cht8PdK52jh5zMgCskc1HFkwY43M5zW97jxfO7dyV5vKtq+FpL3Uqsqy88+ZWh7UrW8vQQZegf6LWQD3qieKXOLyjRyhc0X33RlDpkIO09RF/uQkeDtLeo6CZPBAK7C7xQdKMO3CX+pUjc8NCb4o6xoA8bG5W3IfLTGLyu4KEqwqLhC4KT9s5RbLeeB8+3oSgUkSMUXDgtbsfmLxAa/8EFDca60od0fp2O0GTH3KCsgKVfvO76coXh3eGclAwNulZzBAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=azbLkUxrEBUfEW0KoJGkOs75usQXd9T0VSQpPuCpIKw=; b=JTFEEszSFKhxUo9bpvsT1Fgadd0hJULqhJJmXdxB30ut35XeaBwGkbpgcHhLgUHPuiQMlqLLbcoGWxoQmSfJvqXv02gocURWN+Jk6nqR5YR1lP33Zsoir7m6O7lychXHOmLl4J5o0wWFBoq5FEr4o8c/MvDprVfFwma3hUu9sgKD0lLU56GjOJBM9gZS2ZQLEGwwnRsD8p2/WaSFM/dKobPalcVqgXYhPlqePJqE6E2c6RBJ29kg60FJAU0AXKqqEYzWRTItR2ETIvsU/3mIjPtCcLkUXWBGytED/a1lr/kLXeRSiZA3voKhM07ftFh/isNnhFukK/1Ae3CSb2YneA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=azbLkUxrEBUfEW0KoJGkOs75usQXd9T0VSQpPuCpIKw=; b=8kkyPztq7TT833w24A+oLmFttTA/qKpVbDaPIVQQELJEkjYZECxacmJGJ0FVRlcLDDvf0vMNoHvMVhIbjoot4xccQZ55lGs49mSHilN49e9yDx2SxH/qdcOLw7Jvu5PEs2lOodxT6tk7+QRwCHXg1NlildGjT6lboS7q5gn7uzw= Received: from AM0PR04CA0023.eurprd04.prod.outlook.com (2603:10a6:208:122::36) by AM8PR08MB5684.eurprd08.prod.outlook.com (2603:10a6:20b:1dc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Tue, 6 Jun 2023 14:59:18 +0000 Received: from AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:122:cafe::ba) by AM0PR04CA0023.outlook.office365.com (2603:10a6:208:122::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33 via Frontend Transport; Tue, 6 Jun 2023 14:59:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT017.mail.protection.outlook.com (100.127.140.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6477.19 via Frontend Transport; Tue, 6 Jun 2023 14:59:17 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 6 Jun 2023 14:59:09 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 6 Jun 2023 14:59:09 +0000 From: Joey Gouly To: CC: , , , , , , , , , , , Subject: [PATCH v4 15/20] arm64: add encodings of PIRx_ELx registers Date: Tue, 6 Jun 2023 15:58:54 +0100 Message-ID: <20230606145859.697944-16-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230606145859.697944-1-joey.gouly@arm.com> References: <20230606145859.697944-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT017:EE_|AM8PR08MB5684:EE_|DBAEUR03FT065:EE_|AS1PR08MB7475:EE_ X-MS-Office365-Filtering-Correlation-Id: c921e843-c98d-49ac-05d8-08db669ea02a x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: iHQeMyt37n1SjrY3jd3K/zgZdOsXN17Y2Wdtjee+dCv6a82wHjHPkVKIPrI0AByQN/wTPQp4zDQSK7MVHbpirjo5NnE8IzGdFlB/AyYvr4bX7kHGTlZzkvYRyTqk0utbCz8ddZpVLRVYYDgfRCCk7S8p5hUEd+qjgyenlV3Nv0jgA2u75+fixkIi/c+3kbNv62WEfZrV2kp5wsEUwB9BMzl55iNHj2eX6jFTdRN02NCBXtHWhqStmnK32QikvPyoFJg4I0YYAOIssPxnoepirxSQtOsixqU0dV+IZDDTudbloCXqEXFmFSHYdT+nlFBU/1jHQA+ZlcUp/1hwrmi+EoHEnvhS8prVL1NHj2R41mwBBN1AG7iBfLErf5K++bNPaBkNLvqhvgwCS4vLCY5g5yXrGP9ueDiYC/1SYzjsxDa69paWr/KvO2lK1R/z85Jtrp2SDbL4Jv8HpHPromL8gHeR/uPMd0iLdKZQDuLCS6uOq91uMpVMQ/XCUCsd+HCL+FPJqjbqN5qx/biC7VKU9CRop42TIAq5Y6dqIfFDl91KADFHF3BjjW0wx9mTW7+l9XQaRdOGqUEsk1aQMGasZp7+QS7LFrSRcZPnba9eDEc6dflMFVqdi6vyWkNkbT2vH1GBZu4dSbz5RmNNo7o64xWkNREKelNCbMtmToBoeV6D6GR0i9ATmHqqZx5/eW+yZZ+uCx8MlC7BuGDiDB8mwBG7W3IqSn5OulRQB18n3iHVVbDLMJZh5+97IaldSZXtRmR0YqNtk3y9DDIF5ciDwQ== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(376002)(396003)(39860400002)(451199021)(46966006)(40470700004)(36840700001)(81166007)(83380400001)(82740400003)(4326008)(356005)(426003)(336012)(70206006)(70586007)(6916009)(6666004)(54906003)(82310400005)(7696005)(478600001)(47076005)(186003)(2906002)(36756003)(40460700003)(36860700001)(2616005)(8676002)(8936002)(41300700001)(5660300002)(316002)(40480700001)(86362001)(44832011)(26005)(1076003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5684 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT065.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8d53d6a6-104a-4e34-5e17-08db669e9a1d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MPpzOuJxQj12K+QP0d2wqGzxnhyZTPpwHMp6guw7MZXmjxDdP10XmnGlt1QDZ7oIM4IqInaDwVJvoJOvYegUnLzvAVuDwlgCzVEu/xkI8hyI3vS5xFL2FBRAARmeft9MsdYJLRlDeZc4OtoC6p50jV3HgDOUxNsawdcGgnh3IQ5YlMaWD9DiDBBsOmisyGu4Bx7pnvT1t/gsu08a1pKfopVEYxmIW5iUXhwYCtHQ0L+yOTQmKJTQnVTiVovCkHZE17ju+A+YmlgwF0RoLa3bKiXMcZz1Yadyb8gnplFlqy+FGfTvvsu0XD9Xt4sr9I8GDoHZscCfl+qImRnZhHtXsoGZArqxzejf6f63BIXPdbMCrkRSsRRCY/X44j0a8rsgq5UpeRvN6LkjVG0O415c9KoeraY6qF7czBGriGugPD49503l6YC8rvh9iAAAPnaQtfBfYfLTR3aPDMCTFUIWe9AFy0yCT78WBmtDZGItkfk18OiwwbV0s0iP+k11b77I132MZwztVZEZ79o8KgE97nuIupZA/rthmtWC24rtxDQXcF+1VQ+8luVnhNWrb7IuzgpVAWUMhNWT8e7RGRPikgQvgUFiiBggAm5bn+o8mZnVN5tHjq+e9dK7sLtNMMVt9Ye24vHMB8UZlp+7pOGDLQvcuk5TZt197odPKs/TUAhkBtJ9w6o61MCkpqoD/5sspCu79sBQivU7w1nKC+5PxRM+4gAZD5IqMK7oMEMOlu8= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(396003)(346002)(39860400002)(451199021)(36840700001)(40470700004)(46966006)(41300700001)(70206006)(82740400003)(8676002)(6916009)(8936002)(81166007)(4326008)(5660300002)(70586007)(44832011)(54906003)(316002)(107886003)(47076005)(478600001)(82310400005)(83380400001)(426003)(40460700003)(336012)(2906002)(36860700001)(40480700001)(2616005)(86362001)(1076003)(36756003)(6666004)(26005)(186003)(7696005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 14:59:28.0875 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c921e843-c98d-49ac-05d8-08db669ea02a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT065.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7475 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230606_075938_435555_0B27AE86 X-CRM114-Status: GOOD ( 13.62 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The encodings used in the permission indirection registers means that the values that Linux puts in the PTEs do not need to be changed. The E0 values are replicated in E1, with the execute permissions removed. This is needed as the futex operations access user mappings with privileged loads/stores. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Catalin Marinas --- arch/arm64/include/asm/pgtable-hwdef.h | 8 +++++ arch/arm64/include/asm/pgtable-prot.h | 50 ++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index f658aafc47df..e4944d517c99 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h @@ -170,6 +170,14 @@ #define PTE_ATTRINDX(t) (_AT(pteval_t, (t)) << 2) #define PTE_ATTRINDX_MASK (_AT(pteval_t, 7) << 2) +/* + * PIIndex[3:0] encoding (Permission Indirection Extension) + */ +#define PTE_PI_IDX_0 6 /* AP[1], USER */ +#define PTE_PI_IDX_1 51 /* DBM */ +#define PTE_PI_IDX_2 53 /* PXN */ +#define PTE_PI_IDX_3 54 /* UXN */ + /* * Memory Attribute override for Stage-2 (MemAttr[3:0]) */ diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h index a45af0a22b25..eed814b00a38 100644 --- a/arch/arm64/include/asm/pgtable-prot.h +++ b/arch/arm64/include/asm/pgtable-prot.h @@ -107,4 +107,54 @@ extern bool arm64_use_ng_mappings; #endif /* __ASSEMBLY__ */ +#define pte_pi_index(pte) ( \ + ((pte & BIT(PTE_PI_IDX_3)) >> (PTE_PI_IDX_3 - 3)) | \ + ((pte & BIT(PTE_PI_IDX_2)) >> (PTE_PI_IDX_2 - 2)) | \ + ((pte & BIT(PTE_PI_IDX_1)) >> (PTE_PI_IDX_1 - 1)) | \ + ((pte & BIT(PTE_PI_IDX_0)) >> (PTE_PI_IDX_0 - 0))) + +/* + * Page types used via Permission Indirection Extension (PIE). PIE uses + * the USER, DBM, PXN and UXN bits to to generate an index which is used + * to look up the actual permission in PIR_ELx and PIRE0_EL1. We define + * combinations we use on non-PIE systems with the same encoding, for + * convenience these are listed here as comments as are the unallocated + * encodings. + */ + +/* 0: PAGE_DEFAULT */ +/* 1: PTE_USER */ +/* 2: PTE_WRITE */ +/* 3: PTE_WRITE | PTE_USER */ +/* 4: PAGE_EXECONLY PTE_PXN */ +/* 5: PAGE_READONLY_EXEC PTE_PXN | PTE_USER */ +/* 6: PTE_PXN | PTE_WRITE */ +/* 7: PAGE_SHARED_EXEC PTE_PXN | PTE_WRITE | PTE_USER */ +/* 8: PAGE_KERNEL_ROX PTE_UXN */ +/* 9: PTE_UXN | PTE_USER */ +/* a: PAGE_KERNEL_EXEC PTE_UXN | PTE_WRITE */ +/* b: PTE_UXN | PTE_WRITE | PTE_USER */ +/* c: PAGE_KERNEL_RO PTE_UXN | PTE_PXN */ +/* d: PAGE_READONLY PTE_UXN | PTE_PXN | PTE_USER */ +/* e: PAGE_KERNEL PTE_UXN | PTE_PXN | PTE_WRITE */ +/* f: PAGE_SHARED PTE_UXN | PTE_PXN | PTE_WRITE | PTE_USER */ + +#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)) + +#define PIE_E1 ( \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_EXECONLY), PIE_NONE_O) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_READONLY_EXEC), PIE_R) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_SHARED_EXEC), PIE_RW) | \ + 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_KERNEL_ROX), PIE_RX) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_KERNEL_EXEC), PIE_RWX) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_KERNEL_RO), PIE_R) | \ + PIRx_ELx_PERM(pte_pi_index(_PAGE_KERNEL), PIE_RW)) + #endif /* __ASM_PGTABLE_PROT_H */ -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel