From patchwork Wed Sep 27 14:01:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13400864 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 EDEEEE80AAC for ; Wed, 27 Sep 2023 14:04:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 89F588D0088; Wed, 27 Sep 2023 10:04:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 84F2B8D0087; Wed, 27 Sep 2023 10:04:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62C2F8D0088; Wed, 27 Sep 2023 10:04:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4D85C8D0087 for ; Wed, 27 Sep 2023 10:04:20 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0C47E120970 for ; Wed, 27 Sep 2023 14:04:20 +0000 (UTC) X-FDA: 81282547080.13.FC54128 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2040.outbound.protection.outlook.com [40.107.8.40]) by imf29.hostedemail.com (Postfix) with ESMTP id 9F1F5120041 for ; Wed, 27 Sep 2023 14:04:14 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=H8Hg7w6A; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=H8Hg7w6A; spf=pass (imf29.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.8.40 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com; dmarc=pass (policy=none) header.from=arm.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695823454; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/I92rNNx5TqEbey9j1hFMnq7mlmwNIJKGHIEaPtAbF4=; b=qwe74xk+0yDCHmjilB4PB1sksjj9wq5uQUNMeiEb/34CV6et1yqx/ulO0YHdLe8n9pFmTA Sby2qj65N1/pDhlvhoLm1/jiZEJ9Q5Vj8PNoiiCP1I5SS3qFtJb8H2uS6DTDFk0DpGzNcM OxGf0f4UvAK/5iOof0ZuYcSRazo6xhg= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1695823454; a=rsa-sha256; cv=pass; b=UtES2S/PGs+Sx/YNpBSH4KTRrIWKm9UoJKlTIh72xeUUSNF++9NQwM+NDS8NH/+MFHoQwA TM2Kj6zh4Nqspo2PPN+2k39wjJosk+SPyrdkolg88woBxrwqfRMEIWZ6go89PjFZTuqQEK 8ESFJmRI57L0Zt9PXgfARkmUaAo2XS8= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=H8Hg7w6A; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=H8Hg7w6A; spf=pass (imf29.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.8.40 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com; dmarc=pass (policy=none) header.from=arm.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") 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=/I92rNNx5TqEbey9j1hFMnq7mlmwNIJKGHIEaPtAbF4=; b=H8Hg7w6AF7OPMaH+VaipT3jPK1K42vvXg9JCuSTzC5i+dlyDofwHIRXQ1MY6ps6b4izIMs4y2glSN78wCOJ2usso3fI3pSxP5BSghuSEHnAcA/aCriehlgQxZoHVEEX9Ic/he40x7j/rjE7ltloJZR2dBBofJ21TkuScg6CXr8Y= Received: from DU7PR01CA0018.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::12) by VE1PR08MB5677.eurprd08.prod.outlook.com (2603:10a6:800:1ab::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 14:04:10 +0000 Received: from DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:50f:cafe::34) by DU7PR01CA0018.outlook.office365.com (2603:10a6:10:50f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Wed, 27 Sep 2023 14:04:09 +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 DBAEUR03FT062.mail.protection.outlook.com (100.127.142.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Wed, 27 Sep 2023 14:04:09 +0000 Received: ("Tessian outbound ab4fc72d2cd4:v211"); Wed, 27 Sep 2023 14:04:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ce9f6ca37187b3a7 X-CR-MTA-TID: 64aa7808 Received: from d2cae1e84635.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 50FED27A-8C4C-4666-BC8E-587532D495E0.1; Wed, 27 Sep 2023 14:01:55 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d2cae1e84635.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Sep 2023 14:01:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zlto4wgR4Gv99odT4ptsR25bqtIAAHTsGfkPBPz/Vq/ol1fvZCogvFu3ZWrIetRB8EaT8x7efpLPf3FGjaiUnqoAfbph5JFQkSaLGLpWCrdDy3l7YZ/livp/OdinHah6S8SwrcvF0JP3jz0dpWHNp9VIIGAO6uh/PKgx+sNYVMyRzs/Uu+eUX0X+b1uZTN6MXo4hfTx4KdUFboUuhAdiQdc9GKuXs33hsGhdfcIWAypVSuz11Vyq+JosrmNYE3V8PyFznnc3kkzg0Bc6erjMXA0NNZ2P8YtJ5gDTC6fXLz2XErYsqqZcv8Yb8ocD3uqOb0iCC8T/OO6gMFkjTgJG7w== 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=/I92rNNx5TqEbey9j1hFMnq7mlmwNIJKGHIEaPtAbF4=; b=kKnmc4iLPZiDuKpVpni2AQsHMrku8mIkP2dmhqCM6veHpjeIMCU/bcq1I73BMqj3MGrJce+y2W7Zdt4HVVoc3Ah3Gmu2ljqLXEkmKG0ASz4IYIAB7tJrRYmUyL8JB1pNHQo1lQrv1OKbXlF6yNafOCzwqlA1x66wE1YeWkHGLf9IF7xguVztMGPmynJ8xyLLO7P31QhjJHO6SO/STlH1BmPz/QEFGI6j19KUGT+4rGnkWdN7V93uW17gKwFi1/w8eDxrsozqtEFf5GO8hzrAt2XwldP1kPWpyGItUzyPpbnNyFxJS/CarRsSiTcUSTE0Kv2APbrt2XvmQIEXhm2GkA== 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=/I92rNNx5TqEbey9j1hFMnq7mlmwNIJKGHIEaPtAbF4=; b=H8Hg7w6AF7OPMaH+VaipT3jPK1K42vvXg9JCuSTzC5i+dlyDofwHIRXQ1MY6ps6b4izIMs4y2glSN78wCOJ2usso3fI3pSxP5BSghuSEHnAcA/aCriehlgQxZoHVEEX9Ic/he40x7j/rjE7ltloJZR2dBBofJ21TkuScg6CXr8Y= Received: from AS9P194CA0026.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::34) by DU0PR08MB7785.eurprd08.prod.outlook.com (2603:10a6:10:3ba::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 14:01:52 +0000 Received: from AM7EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46d:cafe::6) by AS9P194CA0026.outlook.office365.com (2603:10a6:20b:46d::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:01:51 +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 AM7EUR03FT013.mail.protection.outlook.com (100.127.140.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:01:51 +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.27; Wed, 27 Sep 2023 14:01:39 +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.27 via Frontend Transport; Wed, 27 Sep 2023 14:01:39 +0000 From: Joey Gouly To: CC: , , , , , , , , , , , , , Subject: [PATCH v1 11/20] arm64: enable ARCH_HAS_PKEYS on arm64 Date: Wed, 27 Sep 2023 15:01:14 +0100 Message-ID: <20230927140123.5283-12-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230927140123.5283-1-joey.gouly@arm.com> References: <20230927140123.5283-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT013:EE_|DU0PR08MB7785:EE_|DBAEUR03FT062:EE_|VE1PR08MB5677:EE_ X-MS-Office365-Filtering-Correlation-Id: 1bd687da-dfea-4c6b-08c4-08dbbf629ef6 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: xYCsGDyUPN/PmUgZAqlashireo/7GWtX1/tR36YaVmBBuyikWn0RalufWOFYAfSi6zBDNAh8SLBOFC4505P0mRwC/bazQdkMceBPoxPjWWt+CTd6K99zYUnaq4PSyGIBybXLaIDZknhNRs+iR6MdI5kVVZ7SVZf3bx3bGmEd91ohTv6LLFNR76+nALNftxEZt9bQKSeP9tDtN/hIdszi10QBJZY489+pYF0UM7cfLX7r7A65W/1xenmMqQ8nGEGVCoQZ/C8ZkAuwb9yRUWjyDrirU6xjR+aHQXVLUgcdcwWvYQfJg6uttSo/82BKOgxVEvkykhEguazauSZtm7pqFz+8rNclvAuqBZXG83ac4pybtMnQbK2PCTwhuOQ8d67+bbVOcWp+jAi+S2NCU0dq49Ba+hGby5FQ3i6JkL9KLaaoSCrRyaJIh8BC1TfFJYPTYT9el8cpi0AVOEJ0jRIwb7lasFgUC7W/u/6IbiFjbKSKRG2aM0qmzlup5Fid/hzNTYFA1eUV5R+Ad15qECO4KIvfAHRXvhkkD2C9i1tfouPnV1tWB0fC0HCM9C2DnGgPZ3/zttm7XaOFG1p7GCAamXTiwIOZHgpY5SqaC47rVrtER7hQa9a2JtExf0q7Db2h0Hqby2Hm0at5nDkdcIaaJwi3YoDllwSss0JhQUM+kN7tujUR+Wi2QlEi99A48q0ifwM4m9j+wy9jiAAxIyrub8sbssd6PYD7eSuSgBWOtlyJ0B1Kaci+2rZv6PnSt7tfEMTHhvYxMxrQbnJ4/UN66g== 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:(13230031)(4636009)(136003)(346002)(396003)(376002)(39860400002)(230922051799003)(1800799009)(82310400011)(451199024)(186009)(36840700001)(40470700004)(46966006)(26005)(6666004)(40460700003)(478600001)(1076003)(2616005)(336012)(426003)(36756003)(82740400003)(81166007)(83380400001)(86362001)(356005)(47076005)(36860700001)(5660300002)(7696005)(40480700001)(8676002)(4326008)(2906002)(8936002)(41300700001)(54906003)(316002)(6916009)(7416002)(70586007)(70206006)(44832011)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7785 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 11a7d343-b7db-4e37-6fe1-08dbbf624cc6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R4C7bWhG4sip56f13doigCcMJGkq8qqDQwZPAWqerLps/BEX86UXnWPYM7fjLbCxIgzd/er/4PEGhrTxJZm2tGjvhNk+iJ6Wqf2gYr5DPOL704/8OYqQV3ONQrNd0pscZdj6Nfv2VRMQLpG77dnsWyYR7dEcnDtsa71MuytUgiSvY/P0npKEYpqr1pnlW7jLKbb4t2rwphCPKIl4mv37yn7ZJ1vgGLLXmyoK+ExouT7mkjyaFbews1goLKlMFdnfoqdKmKJnqBhQk5jLfzspD53D2OR3QwieeU5wNbIee1c6vj77WT7rpU9tKYckyR6p9ezW4DwTu07AIJMQNs0PQh5xeUbm7ueiLZJNZyh+D9HhZ9Z/NkbCdLg2NMftor0jXc9FCFdqLY3Qrz51xxiztVzBStesPLyZCsz8CICtCzbqLnOIm0Uz/5a+rTKFVTwpESkzREvs8WDBebFEyt0C4iTHEa1+wow2YgbLYel3il0kH2I9LWuXjMPku98ATCg/4dJZteOu5jEN4lmrLPSijdYc/wl79tUsUtDDqekbSukIupbzjbrZTJZqMQah48DtmKQecWGjeDOj+rFsNoVTgTC5lnvyYk/Bv6CMlV+DSIRB7/DpoZoSduHsrVKrP9hrfjLQERiNXkDKSlZqVR5n3kiQamByPnpvjPoFMB+yJ3yl16RxiRIcDX10FPL98WpR/R7/caF7H6QxqJWaLhd5xQDPY7PPDWsoKWLDTaQR9su2Kxi3oSzl7wIvrNQTvHNq 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:(13230031)(4636009)(376002)(396003)(136003)(39860400002)(346002)(230922051799003)(82310400011)(451199024)(1800799009)(186009)(36840700001)(40470700004)(46966006)(8676002)(8936002)(41300700001)(6862004)(44832011)(426003)(336012)(40480700001)(26005)(4326008)(2906002)(478600001)(70586007)(70206006)(316002)(54906003)(5660300002)(7696005)(6666004)(107886003)(40460700003)(36756003)(36860700001)(1076003)(47076005)(2616005)(83380400001)(81166007)(86362001)(82740400003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 14:04:09.7212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1bd687da-dfea-4c6b-08c4-08dbbf629ef6 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: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5677 X-Rspamd-Queue-Id: 9F1F5120041 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: dpd5dob8jtuipx6s67bcxxxdgduoh868 X-HE-Tag: 1695823454-941529 X-HE-Meta: U2FsdGVkX1+GGbygsBlsJwwk7aHMcHZKZkZRdaOcMotD8ch/IfQPZRZWpMXnDSBzSyjVYSXjujBwNXXwoZFlSPccprdtmDwZva8OnVDnNHu58nDT3hUQxD4q9BFC1NetAluE+i3oWHSxQqXPhBJfnY6qCdKiKH7BvSOdDay1pzD4KXuGKOPs9n451+BWc7s4FJwqhps9Ew+iGZmhcrGGNZBXyZV1VgqfZXoIuWXSCoXnUWjiAkDMNBoV5MGY7dpGtuR1Gb5XrciBj75/fFHqznC/EPUcaM32xCE/70d8zYYkyhml0pEifWIkQNhf5vHLNBoYB5C5OCm/3rQzZeDsUwn1/Wjr9ePShXoQgO2PBQKpIV+BNSAbg3OpGJfeEJTRzkiRCp19lQWlfQGvA/exndPGlY6bBqXf5QmBaXjsmPpVXZClxAOBmnba8fC6yZFUK03R/3K2Lw1dinL6+pXvUicZHgpu7WqLu3+yKvbocG0W0makGUpYrCLobmEdC5MvLdDi6nv4AsslrOljTSBa7meZSRUqhEwFuVHNZO72A4LhPJ7W0QvUZA2oO6SWd0TBCf+elKfDBEGnq3sYIatbgNKp8hkGx4JYMw8QR++sgXeD0CvuePsT8LsjnSloC8Yl5ug93I0dExNQPqJ7aDPbnEMpMbf+5nHLzXs5/r3oeEnNIrhEYXthlUXCk6rOWJGyDh25iCw2d1adqfI/2wdlcsuG3mN9eAppekH++qLApFXpUFNmfqu8JMQBTDovAeRkRoazgi9q1bXYUIo9UtXT/xHp4X92lh7Tfh3w5MABeN817/NW4V1n14p9e/uGztwPa9RKtRmHYQzPKYdPjpoVtpBUbJeagt5fb7OJevVFEPH/TBU+igW4kweY8UAJfj7vB9d3a+mk5l+2v+ngLnE2dnXY6EjIcU8pFRXxHOmsLi9xD9f/3gsiNDMXLYPG9qE66pP7xTaneuEIfS9pO+2 O0JYlqIO /AHsNUYbA3VAFrkRvw+fIWWDIAOmPH7o0UfBtSZFCsHPwfwjKghnrULpbJe99engrwNsZcHinZtiMsJqCeSNtYnwcKU/ECMQo+lh4gufibp3koOfKHkqlOLLhoSmJB13GI8WmBKKgYHiLxtj/lZd6ONtngHXLpsStrdqkDwbHuYONBSEwH9Fm25rk/KYdcdOUQGG4+b3ueBFdglDUBIWPd5Ao33Z3EitktilJeujiAcRWVhJEeEG9tEVrU0/HI2mgRvn7YgtzfERE68ITE3KzFfvBeCaDfFLmUY9McZvwHneJqwckRs2kgsFZcv1xkKhZKIXiX/WRe6TB2Fqoh5dYY33VRdewyJPgSnO68uzThvIioGRlfdt32oBhO/wRhkHkNfhbWvcZty8wEKoNOaUIrneF5rdsMMadHcvzmqzvO/o6qR8J3DJZhWNdLIK0hViQKftMf2Sj7z49cji4rMRGOAAmWWSXXqpC/FjsL0H+npAmbJ6rAPDHoOzg8TGNs/MHCAqNP156uYT/PsAvv4Y50X0WNlrYN0+iavZZgqzPa1Kr0SXX7qfnXluvLS9qv4c97i19AxmiW+ohtXIKtUbcC9BSA1GtZu/xfT9QR3e3kAgTGgk= 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: Enable the ARCH_HAS_PKEYS config, but provide dummy functions for the entire interface. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/pkeys.h | 54 ++++++++++++++++++++++++++++++++++ arch/arm64/mm/mmu.c | 5 ++++ 3 files changed, 60 insertions(+) create mode 100644 arch/arm64/include/asm/pkeys.h diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b10515c0200b..c941259e0117 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -34,6 +34,7 @@ config ARM64 select ARCH_HAS_MEMBARRIER_SYNC_CORE select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE + select ARCH_HAS_PKEYS select ARCH_HAS_PTE_DEVMAP select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_SETUP_DMA_OPS diff --git a/arch/arm64/include/asm/pkeys.h b/arch/arm64/include/asm/pkeys.h new file mode 100644 index 000000000000..5761fb48fd53 --- /dev/null +++ b/arch/arm64/include/asm/pkeys.h @@ -0,0 +1,54 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2023 Arm Ltd. + * + * Based on arch/x86/include/asm/pkeys.h +*/ + +#ifndef _ASM_ARM64_PKEYS_H +#define _ASM_ARM64_PKEYS_H + +#define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2) + +#define arch_max_pkey() 0 + +int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, + unsigned long init_val); + +static inline bool arch_pkeys_enabled(void) +{ + return false; +} + +static inline int vma_pkey(struct vm_area_struct *vma) +{ + return -1; +} + +static inline int arch_override_mprotect_pkey(struct vm_area_struct *vma, + int prot, int pkey) +{ + return -1; +} + +static inline int execute_only_pkey(struct mm_struct *mm) +{ + return -1; +} + +static inline bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey) +{ + return false; +} + +static inline int mm_pkey_alloc(struct mm_struct *mm) +{ + return -1; +} + +static inline int mm_pkey_free(struct mm_struct *mm, int pkey) +{ + return -EINVAL; +} + +#endif /* _ASM_ARM64_PKEYS_H */ diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 47781bec6171..3b7f354a3ec3 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1487,3 +1487,8 @@ void ptep_modify_prot_commit(struct vm_area_struct *vma, unsigned long addr, pte { set_pte_at(vma->vm_mm, addr, ptep, pte); } + +int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, unsigned long init_val) +{ + return -ENOSPC; +}