Message ID | 20230413110513.243326-17-joey.gouly@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 E20BDC77B6F for <linux-arm-kernel@archiver.kernel.org>; Thu, 13 Apr 2023 11:20:51 +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=T6bnYZHHtRH+3BefLz3C1sOugInBpdHIZZvzldfTpH4=; b=2Lie7UPdaUMfLY UviKLhPL7Xvp8PBRK96HmCeL6Y9oGivWX2Na4D7oDptT5QIUUaW6NO4pD3I/e+k+s7af1yLQMhmen 0RdQAF6BkG+WlvkfwN7+ytm4r68P/AlIY2BETi8YV4FlKHFJMGoNFwHATeuteacSXD9ET2reO5bTn XS7QfyhRa7u22o0alV0zawm5tJIQcjcn1Oy3R1Zt/Oz32gjGxaewQJK70iv7cstSvA78RGjyb9gDU N3iuK+qgsPnYcHcz5RH0gUSNH/nZYd8oqDyKRFNVxoHGIk4NwAKAgx+0Sr3mEkn873KW8nb61/Fe/ QuS8dswAUSExwRCUofuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmuzb-0062lW-0x; Thu, 13 Apr 2023 11:19:55 +0000 Received: from mail-dbaeur03on20610.outbound.protection.outlook.com ([2a01:111:f400:fe1a::610] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmuzX-0062km-2m for linux-arm-kernel@lists.infradead.org; Thu, 13 Apr 2023 11:19:53 +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=Dg8h/Kks3gw1dZsKPVovuQz3Zwm5qmizU2EkGb6xbJA=; b=9svxUTipyYgEZTibaT7zWTtNjteJEAiKtFqK/OpmVTsJlLOD/js5J6ZBoWdNOXGnuVauqa5GuA5ACMTBXc1v6R05RHlkgmLahJ7Ft7MeqyVew9posxk9+6gTZUUv/WRKXCGxIwSaP3U+XtA9ISCdf2sQii8BHwLFhqVA3g45VYE= Received: from AS8PR07CA0013.eurprd07.prod.outlook.com (2603:10a6:20b:451::21) by AS8PR08MB10072.eurprd08.prod.outlook.com (2603:10a6:20b:634::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Thu, 13 Apr 2023 11:05:38 +0000 Received: from AM7EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:451:cafe::51) by AS8PR07CA0013.outlook.office365.com (2603:10a6:20b:451::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.6 via Frontend Transport; Thu, 13 Apr 2023 11:05:38 +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 AM7EUR03FT033.mail.protection.outlook.com (100.127.140.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.32 via Frontend Transport; Thu, 13 Apr 2023 11:05:38 +0000 Received: ("Tessian outbound e13c2446394c:v136"); Thu, 13 Apr 2023 11:05:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 055d5ecccf1c357a X-CR-MTA-TID: 64aa7808 Received: from 66ea4bde5584.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 633898F7-DADC-45DE-92EE-66D71E838193.1; Thu, 13 Apr 2023 11:05:30 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 66ea4bde5584.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 13 Apr 2023 11:05:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTGchkOwnuOMq+Mxk1WCnXo30541nBoHAKgQYBNk/npcSe+hHDeCEMv1kaAPYEu/4uDZ7cTd5gOIrmvbQLOj/0S8z/Ya88eQdMDaKSVH0xQ5BNLLFpiVcuxfHtk2kegYQ2CK9IgWAHAIJfKjMc0cdd6bo2RrkrJoYw1ORgr9QP3w4dnQrBehKKuTw4tKawEFWn0d/FrLFlBSWkEWRr9Fj2p1WoEcsnA7t+A09DN+A1dtZs3ejrTJvED5xJwfVS15yrNsfhrPurciPZ9ywtfNBC4lfrT6PGU7L/8xz8qU+tVsZep1RD5HpvWbMxxxEbK/xiqn6vVrpoX234/y+8vnLw== 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=Dg8h/Kks3gw1dZsKPVovuQz3Zwm5qmizU2EkGb6xbJA=; b=Zdn2JGtDLaxSXeZ6vtUp64SyCvSUmhH2jZqPsDGeUphTTAI9BsUEOineRZPOltqg/FhfQK96AEquqSMCIYqs+9cif5B++5vaNnWoEJY/b8efwbk/XcXR0XfTpiCpqNGs5nKO9JVc3kK7lKFtsdi7TtOlFVCqlzEeN5Gwk0cl10HCR02m+om9css5/TXUk8wvKLSCwOmUOAceM7KtAboZ1tFpDm3plci+sIlX1y186Bt2kgRo/Pm+goniJEN/ojqVkA6pimwb3UCD89rBtW3ck03+YckXG6HDsh2LByU8I8Ddsk0Uzq9nU8QBGWpNeyM3Pgp94Ai6mKM9KWHVrf2SeQ== 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=Dg8h/Kks3gw1dZsKPVovuQz3Zwm5qmizU2EkGb6xbJA=; b=9svxUTipyYgEZTibaT7zWTtNjteJEAiKtFqK/OpmVTsJlLOD/js5J6ZBoWdNOXGnuVauqa5GuA5ACMTBXc1v6R05RHlkgmLahJ7Ft7MeqyVew9posxk9+6gTZUUv/WRKXCGxIwSaP3U+XtA9ISCdf2sQii8BHwLFhqVA3g45VYE= Received: from AS9PR06CA0429.eurprd06.prod.outlook.com (2603:10a6:20b:49e::12) by VI1PR08MB5422.eurprd08.prod.outlook.com (2603:10a6:803:12e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Thu, 13 Apr 2023 11:05:27 +0000 Received: from AM7EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49e:cafe::45) by AS9PR06CA0429.outlook.office365.com (2603:10a6:20b:49e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.32 via Frontend Transport; Thu, 13 Apr 2023 11:05:26 +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 AM7EUR03FT045.mail.protection.outlook.com (100.127.140.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6298.31 via Frontend Transport; Thu, 13 Apr 2023 11:05:26 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 13 Apr 2023 11:05:20 +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, 13 Apr 2023 11:05:20 +0000 From: Joey Gouly <joey.gouly@arm.com> To: <linux-arm-kernel@lists.infradead.org> CC: <nd@arm.com>, <broonie@kernel.org>, <catalin.marinas@arm.com>, <james.morse@arm.com>, <joey.gouly@arm.com>, <mark.rutland@arm.com>, <maz@kernel.org>, <oliver.upton@linux.dev>, <suzuki.poulose@arm.com>, <will@kernel.org>, <yuzenghui@huawei.com> Subject: [PATCH v2 16/19] arm64: enable Permission Indirection Extension (PIE) Date: Thu, 13 Apr 2023 12:05:10 +0100 Message-ID: <20230413110513.243326-17-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230413110513.243326-1-joey.gouly@arm.com> References: <20230413110513.243326-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT045:EE_|VI1PR08MB5422:EE_|AM7EUR03FT033:EE_|AS8PR08MB10072:EE_ X-MS-Office365-Filtering-Correlation-Id: 58ac3641-8e05-49e6-5d44-08db3c0f0367 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: wgrF+vH/drTp1WkJV7FrC1LfODpxczfrpZWmg1bOl3k8sD/gZVHJ8NOhbT2ZD6t/7gyZjKois8YpHCjjoPMuVR2xTKCC3i6mlQWJRa0RTlGpJIPYP09Gd0P8hbWQq5N5seCqbbANI47D6HHz1RAskFYeWf9SV9Q0tNwRQdY4eaPgKD1VoZVxTzFKzlpSDotfuFdt+ovqUJjf6I+3eJOos4WawXINQL9Oe+eNpiAtDRzxZNkpM/0J2pXUqAXxp61MKk51uWFy9jbRbBOtbrND/TJwNmGOnJ4Ud+xnWVkmrs32EppNXuQ001Sn+jDO5HZrpqmnFptmnkcZ82sjHKo+tPjc3duZCZvTB2l8jLD+sS8zfV9U0MUhghFg+QIF4xvuM8oxDQqKonRJ0j6OgT/PiiunomjlHcztLTXxYqW59haf7Oks3NrF3X72TvmliPCTgFBCVv36hN7EYMbcryluTF+aRYDvq5L/hM6Smm91EThU6nJ6gNOgitIwdoiW6gA/P6kF2Daz7hRljrYVQvzLS9LGNOIc2Tv2IZ1dbcZaLP/fIW3OX9NlQDTHzJAyRwiy3u/mzw4spQYipeyWq/MdzLo9yHixI1ZLlg9dGnjNAjiYyr9eOAOfhO9rMJcXvlRsQuiA1ZbaKvoYlaJ3NuhFUIeuYE9c4K4kvS5q0CUM8C649225t2e5PO2PGm/4O0JHqDJi99yLWqvo5UYyec3Jhg== 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)(396003)(39850400004)(136003)(346002)(376002)(451199021)(46966006)(36840700001)(36860700001)(36756003)(5660300002)(4744005)(2906002)(6916009)(86362001)(316002)(8936002)(8676002)(44832011)(40480700001)(70206006)(4326008)(81166007)(82310400005)(70586007)(82740400003)(41300700001)(426003)(47076005)(336012)(2616005)(1076003)(26005)(186003)(478600001)(7696005)(54906003)(356005)(6666004)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5422 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 96091ccf-d6e2-4c43-8b88-08db3c0efca5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hDPdI6RNHMSbkgiZXCgb7yiFV8QXVPIHzCUwdvFxcW76okWkjt5WUFI/mUW/RmsBjUHPn7BD80TNg6257x9tCYUuaUloDEi3mKQiiGnVXXnjoGOQLNA0C1GRlyIJ7xtmuWgzH4ET/9UBPo4L5tkX3GbuloRzpiQXNjOuDepIAJ7O+7RUqqenPmAdESUSOpOWVQSwuJgq9Alc2v5BjTO5z+AmkVN/2tV4a6j8mBbuZvljH2sK6zwy+cDkOmjhcYUeIf4DWgCAajQvIYtsMM9DD/yHGUkCtHVCqd7ySGSx6Tgy0JaIrF1pe89a+X6o4mjIFJuvdFSqHpu8x4QD9N72t9hAftRx380IcxWooElj4EGxnJP4plW1IjSDnNrrnOrckH6tOydzJyxpPoXY/jgde+RHEIizYTmtT4OTCO7Ca6PnCVcK57nHGg4b2jm8ifnfsCmy1n/AtszMZUgSw9SIB7QQKKgKDulyE65T+UmTl8ahKI43gF9+1XW/VwLwiiO28bc1DlQkcrwt8tDjf7Af7DmxqYJB76LKSdvR1r/7gqO7V45LMmB/7RkrSBGI5yswrpC9JTBTh2GWfpZfGnYnfBF0WZJfwJUU7VXkqEh0vfNrpTQo9uKS6Gn0ypeQ9Wia2fk39tMrq4UDqdHRUjoAATzMkAmOAEVyJlQ8I8oSQBos5s7fc6eaaBmD9TNqRj3wcwV9iFtPoxvEqgmY0aXjWw== 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)(39860400002)(136003)(346002)(396003)(376002)(451199021)(36840700001)(46966006)(40470700004)(478600001)(7696005)(40460700003)(47076005)(36756003)(81166007)(82740400003)(86362001)(336012)(2616005)(426003)(36860700001)(40480700001)(4744005)(44832011)(2906002)(316002)(26005)(5660300002)(1076003)(186003)(82310400005)(107886003)(41300700001)(6916009)(8676002)(8936002)(6666004)(70586007)(4326008)(54906003)(70206006);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2023 11:05:38.1713 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58ac3641-8e05-49e6-5d44-08db3c0f0367 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: AM7EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10072 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230413_041951_902416_4C06B2C2 X-CRM114-Status: UNSURE ( 8.03 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Permission Indirection Extension
|
expand
|
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 644e8daa25df..c2695e3ffc96 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -454,6 +454,21 @@ SYM_FUNC_START(__cpu_setup) #endif /* CONFIG_ARM64_HW_AFDBM */ msr mair_el1, mair msr tcr_el1, tcr + + mrs_s x1, SYS_ID_AA64MMFR3_EL1 + ubfx x1, x1, #ID_AA64MMFR3_EL1_S1PIE_SHIFT, #4 + cbz x1, .Lskip_indirection + + mov_q x0, PIE_E0 + msr REG_PIRE0_EL1, x0 + mov_q x0, PIE_E1 + msr REG_PIR_EL1, x0 + + mov x0, TCR2_EL1x_PIE + msr REG_TCR2_EL1, x0 + +.Lskip_indirection: + /* * Prepare SCTLR */