From patchwork Thu Mar 9 14:52:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13167713 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 129FEC61DA4 for ; Thu, 9 Mar 2023 15:04:29 +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=+iju9SK9c4ha4Kz9qfSJCSKCbCAW92esXLg3Z66SUdA=; b=tIbcIP2W8i+LQz 17mQZsDOQ7I5L98H7Eg4fmB4KQunzWLU5W/wI5Og9GDJcHBX16RZyPegfi1a4GaZoRk7XDe37ErCv qasSbd0LTLZaBnlwWgmaDTGKNqGlqpEdatYmuetNacYBebbzpzcfGPmVlHd77d/ciKsIf47sGrLhN NnfLYDvJoivx9/UUiX0Ps8MZ7mweJPDi0qm+6ACkrp/n5nXfPbe7L6jQ7GDRRE+i1SICTUuuflghT mcWzsGrnqHUuOCF4HQBwhKZtWpNn+e7KATo6BNjU/mrfq8DysXANR6Dwp/pREKB1YzbsPhmjm48P6 mb7oYZweGbHgkjs70pwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paHmu-00Al0U-Dd; Thu, 09 Mar 2023 15:02:37 +0000 Received: from mail-he1eur04on0600.outbound.protection.outlook.com ([2a01:111:f400:fe0d::600] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paHe3-00AhPS-PO for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 14:53:29 +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=tg0fr6SSje//X0IJDYSxFIIUW2Hle2E5gmPV7/IUNyI=; b=MjqyVay3kgJNRsEok+lrcP+AIcJ73rwpDe0IiuOG2zPNUQ/bvgxdHaG8azNYjBhMlzt6h7m4/uNKWo1drPT5LXp2WUfcc457kO7IOlDniNeF4bVVqpXlmlLwmjfdxZHTsS2Jc3iujyFhSgZQSmoO0bZfZGM5wQRdsdWErO978mA= Received: from AM6P193CA0140.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::45) by DB5PR08MB10311.eurprd08.prod.outlook.com (2603:10a6:10:4a5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 14:53:18 +0000 Received: from VI1EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:85:cafe::79) by AM6P193CA0140.outlook.office365.com (2603:10a6:209:85::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 14:53:17 +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 VI1EUR03FT023.mail.protection.outlook.com (100.127.144.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 14:53:17 +0000 Received: ("Tessian outbound fcd8b5fba459:v135"); Thu, 09 Mar 2023 14:53:17 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c493025f635c02b9 X-CR-MTA-TID: 64aa7808 Received: from 856b19ade159.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4D7BE532-DEAA-41D3-A753-DF0D0A796C30.1; Thu, 09 Mar 2023 14:53:10 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 856b19ade159.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 09 Mar 2023 14:53:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KbBblTRDwWCa1oDOsfMbmyY+j969JbVLtuc/LYPncWwAj3FsGmJo0wGJdpa4/UamLbkSN+xOF6LP0VopNFx+BW6bJfCDVcgY/4o5AaLFQZhxcN0TqSV3Xb+Y7dZKVylHSZxSJY9U/TniwsMOOtDoswdjbvk7nA3gQnwSN7hJE6l/m/q4/aMSJHaIVXaqFah9Y1+WKIBU3sQRU+asRf6GUEqtFamIDL/U9QeZV3CMkMQ4iTOsZNClgQwW1BD4d3/8YWQ++Sp2N9Kx05HYRxaTLS84tnMMVc49EnElA4NxNS8O2byucmRrhruBxMPCEUDoLVuZul9MKaJEZtmXwbdcTA== 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=tg0fr6SSje//X0IJDYSxFIIUW2Hle2E5gmPV7/IUNyI=; b=EF5/wf4JKZxs870jXAC6Qjx92LqzqcbrV7EVRYxqLH+178aAxqBytPxs+tYV+43Kmz4+c+45/4kxnkzLlwAYRBiKkBCsTNtrmQSdxx1xJhsPQlbzBDuXlWns7vKalXc12F0VX//qJboVWPVXQIpmddgwo9rlx0h1l7dapB9Bh677vcO+paJkGUZWvXvCuAbdv4xdIt1KebmXUUiBUlrAx3o4OmUCIShV8b0AqQAOguo65rzwP6SyIrraMxYfiYg+sYgagr7Fj8rrBFqSTDa1KWd6xH5CFKxG2HaAQiqo/ybjvZQjx8lLrI2ULKwijN8suXHYru2wmLWMYEQF9VxQCw== 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=tg0fr6SSje//X0IJDYSxFIIUW2Hle2E5gmPV7/IUNyI=; b=MjqyVay3kgJNRsEok+lrcP+AIcJ73rwpDe0IiuOG2zPNUQ/bvgxdHaG8azNYjBhMlzt6h7m4/uNKWo1drPT5LXp2WUfcc457kO7IOlDniNeF4bVVqpXlmlLwmjfdxZHTsS2Jc3iujyFhSgZQSmoO0bZfZGM5wQRdsdWErO978mA= Received: from AS9PR05CA0103.eurprd05.prod.outlook.com (2603:10a6:20b:498::34) by AS8PR08MB6470.eurprd08.prod.outlook.com (2603:10a6:20b:33a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Thu, 9 Mar 2023 14:53:08 +0000 Received: from VI1EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:498:cafe::a8) by AS9PR05CA0103.outlook.office365.com (2603:10a6:20b:498::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 14:53:08 +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 VI1EUR03FT059.mail.protection.outlook.com (100.127.144.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 14:53:07 +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.17; Thu, 9 Mar 2023 14:52:55 +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.17 via Frontend Transport; Thu, 9 Mar 2023 14:52:55 +0000 From: Joey Gouly To: CC: , , , , , , , , , , Subject: [PATCH v1 12/18] arm64: add PTE_UXN/PTE_WRITE to SWAPPER_*_FLAGS Date: Thu, 9 Mar 2023 14:52:40 +0000 Message-ID: <20230309145246.22787-13-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230309145246.22787-1-joey.gouly@arm.com> References: <20230309145246.22787-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: VI1EUR03FT059:EE_|AS8PR08MB6470:EE_|VI1EUR03FT023:EE_|DB5PR08MB10311:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ebbc0e8-baad-49a9-1667-08db20ae04b7 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: KHLpIekj/HU9EnN++XQ3H0jUHzPB5TOfwMeomPCTGXsneTBSFgYHlrTQFdGss4zH9IT7+wy5ADJkKXtqr76Pyp/6406S27UQEkA0lExeCldNArMvijw2cb+afG1e2b43sR2LW4AR+uZtptvtkFbJ3VcNIl80xy2qCK1UG8KISJjEca0cnpC6Jl5dx//nNFgc2VgRYyyoBeeeIAuZwzxIyCGL+UWfiVyNIQ9k0V6veuUUTfZtebL1jLDTMx6dPI6bScxIhsbGUO3Qde7G0AOT4De5fS4LEab+kNjaEkGfEFGQUsOMlpHP+ZVLR9fKLSgj0LBcYDjJx13LjuSvkN+yk0f1/DGiEoaICWlFSn9BINoCvmhtXsHYmgQSYjvuGb3RfHSu2QtX7jZ1sDUdWavpFNhG8UsUweb4mrdY3boq4MF5UCPBPK/uncwRxQAcEB3WcAOHpFnFBuN3iUtMcLZd3XrjNe08JMSwL8meRuyQ4bs73Lr9eSDe+4HGiWmwqwYarQe+uGYZJjdxpO41xW62TKn+bhwbruLUCZ9bcBC4+8FLvjeBqb27EwRvXZmR7MvCCynk/RlF7Jgl30yuTcel6SFrpJIYyknMYKv6sVymqIKK2gpzHlvJ3rErMyQm6Vvitk7WRXiQ1wWTmyBHmemXYlrp8BBgZFRLOy+0RpSs8UkEa5syMU8NLv7uhXX83tHh/eAaVsN0jChRc2sgLK7arQ== 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:(13230025)(4636009)(396003)(39860400002)(376002)(346002)(136003)(451199018)(46966006)(36840700001)(8936002)(36756003)(5660300002)(26005)(1076003)(4326008)(36860700001)(82740400003)(6666004)(81166007)(426003)(83380400001)(47076005)(82310400005)(336012)(186003)(2616005)(54906003)(40480700001)(86362001)(316002)(41300700001)(6916009)(8676002)(70586007)(356005)(7696005)(478600001)(70206006)(2906002)(44832011)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6470 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2d3882ff-dbce-4a9c-7fe6-08db20adfedd X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hkkIvditZWc2qce8KTiXzj5nrrJt1ch733kCesoFio09pzLpUnmdcIWrzCda0AcWRPecjZTf4HhYqPh9Cu73Efynx51DmG72DgReS2IH3xBY0uiBCIAsR5AD3dgmMXqEBXllo889X+ucCO61VIhd/zyZuJO9pUJ/NW3pHs3szTy/HrcK3jHLxSdK0hGFM80dnzwGPuzyFZMT115wXwKXx/zgtCVAtYCGJrHNmMt/1D2vRE/NnK/OyrSg1vVSClDnuKQvziXlKYVSOmxerT+3XF+iGyd1ydfWv/kVpig4+Z1a+VC2Ahh8qOSHbmR2ZP7AnY/a2PcyM9vf60x8W8YbYyc92HHzxGJXNpBAkmsMbJVjGtim6Y3MF42UYtcu3XfRGFg9bK+miUf/0S+YU0Yhhf602N7kYo1wMiPLPOvC2rll89VkCfP098U4a8HIopK30cx6LqZlIO50xZ091m8nThBn9fUYAmk9YJZWyIrn1OUmnU+W1+O+3Z5jER2+i5SFWUPQehnvV0Ulxw7n9PDmKt64QxcoV19EkbVOqECG7CLF64tkVOJ6kiUCXNNn9VPm97hUyzrZfLomVPvayMbUi1Na4ND2Uyl/+sYtjc+5GbJkU5DKlk8Xq7nUHTH+cQruq+7DidxP7tL8gQ77t2dL16WKTy/mUqHVcGbgeBO/mzo6ebEKnCya2/OScpEorRfm95CNxcggT2qWYFkUFGczbg== 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:(13230025)(4636009)(136003)(39860400002)(396003)(346002)(376002)(451199018)(36840700001)(46966006)(40470700004)(336012)(426003)(47076005)(54906003)(36756003)(40460700003)(86362001)(81166007)(82740400003)(36860700001)(26005)(1076003)(82310400005)(83380400001)(40480700001)(186003)(6666004)(2616005)(7696005)(107886003)(5660300002)(316002)(478600001)(4326008)(41300700001)(6916009)(70206006)(2906002)(8936002)(70586007)(8676002)(44832011);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 14:53:17.7625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ebbc0e8-baad-49a9-1667-08db20ae04b7 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: VI1EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB10311 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230309_065327_888198_C8FB8D05 X-CRM114-Status: GOOD ( 12.23 ) 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 With PIE enabled, the swapper PTEs would have a Permission Indirection Index (PIIndex) of 0. A PIIndex of 0 is not currently used by any other PTEs. To avoid using index 0 specifically for the swapper PTEs, mark them as PTE_UXN and PTE_WRITE, so that they map to a PAGE_KERNEL_EXEC equivalent. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland --- arch/arm64/include/asm/kernel-pgtable.h | 4 ++-- arch/arm64/kernel/head.S | 8 ++++---- arch/arm64/mm/proc.S | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/asm/kernel-pgtable.h b/arch/arm64/include/asm/kernel-pgtable.h index fcd14197756f..daf1909116f6 100644 --- a/arch/arm64/include/asm/kernel-pgtable.h +++ b/arch/arm64/include/asm/kernel-pgtable.h @@ -104,8 +104,8 @@ /* * Initial memory map attributes. */ -#define SWAPPER_PTE_FLAGS (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED) -#define SWAPPER_PMD_FLAGS (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S) +#define SWAPPER_PTE_FLAGS (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED | PTE_UXN | PTE_WRITE) +#define SWAPPER_PMD_FLAGS (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S | PTE_UXN | PTE_WRITE) #ifdef CONFIG_ARM64_4K_PAGES #define SWAPPER_RW_MMUFLAGS (PMD_ATTRINDX(MT_NORMAL) | SWAPPER_PMD_FLAGS) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index b98970907226..989e2132af14 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -382,7 +382,7 @@ SYM_FUNC_START_LOCAL(create_idmap) adrp x0, init_idmap_pg_dir adrp x3, _text adrp x6, _end + MAX_FDT_SIZE + SWAPPER_BLOCK_SIZE - mov x7, SWAPPER_RX_MMUFLAGS + mov_q x7, SWAPPER_RX_MMUFLAGS map_memory x0, x1, x3, x6, x7, x3, IDMAP_PGD_ORDER, x10, x11, x12, x13, x14, EXTRA_SHIFT @@ -391,7 +391,7 @@ SYM_FUNC_START_LOCAL(create_idmap) adrp x2, init_pg_dir adrp x3, init_pg_end bic x4, x2, #SWAPPER_BLOCK_SIZE - 1 - mov x5, SWAPPER_RW_MMUFLAGS + mov_q x5, SWAPPER_RW_MMUFLAGS mov x6, #SWAPPER_BLOCK_SHIFT bl remap_region @@ -402,7 +402,7 @@ SYM_FUNC_START_LOCAL(create_idmap) bfi x22, x21, #0, #SWAPPER_BLOCK_SHIFT // remapped FDT address add x3, x2, #MAX_FDT_SIZE + SWAPPER_BLOCK_SIZE bic x4, x21, #SWAPPER_BLOCK_SIZE - 1 - mov x5, SWAPPER_RW_MMUFLAGS + mov_q x5, SWAPPER_RW_MMUFLAGS mov x6, #SWAPPER_BLOCK_SHIFT bl remap_region @@ -430,7 +430,7 @@ SYM_FUNC_START_LOCAL(create_kernel_mapping) adrp x3, _text // runtime __pa(_text) sub x6, x6, x3 // _end - _text add x6, x6, x5 // runtime __va(_end) - mov x7, SWAPPER_RW_MMUFLAGS + mov_q x7, SWAPPER_RW_MMUFLAGS map_memory x0, x1, x5, x6, x7, x3, (VA_BITS - PGDIR_SHIFT), x10, x11, x12, x13, x14 diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 91410f488090..644e8daa25df 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -290,7 +290,7 @@ SYM_TYPED_FUNC_START(idmap_kpti_install_ng_mappings) isb mov temp_pte, x5 - mov pte_flags, #KPTI_NG_PTE_FLAGS + mov_q pte_flags, KPTI_NG_PTE_FLAGS /* Everybody is enjoying the idmap, so we can rewrite swapper. */ /* PGD */