From patchwork Wed Jun 7 09:01:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13270251 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 7BC7DC7EE23 for ; Wed, 7 Jun 2023 09:02:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.544538.850389 (Exim 4.92) (envelope-from ) id 1q6p36-0001nq-Fg; Wed, 07 Jun 2023 09:01:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 544538.850389; Wed, 07 Jun 2023 09:01:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q6p36-0001nj-Ct; Wed, 07 Jun 2023 09:01:48 +0000 Received: by outflank-mailman (input) for mailman id 544538; Wed, 07 Jun 2023 09:01:47 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q6p35-0001nd-Cl for xen-devel@lists.xenproject.org; Wed, 07 Jun 2023 09:01:47 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ec0e52f2-0511-11ee-8611-37d641c3527e; Wed, 07 Jun 2023 11:01:44 +0200 (CEST) Received: from mail-dm6nam11lp2176.outbound.protection.outlook.com (HELO NAM11-DM6-obe.outbound.protection.outlook.com) ([104.47.57.176]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 07 Jun 2023 05:01:32 -0400 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) by SJ0PR03MB5951.namprd03.prod.outlook.com (2603:10b6:a03:2de::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 09:01:28 +0000 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::192:6bdf:b105:64dd]) by SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::192:6bdf:b105:64dd%3]) with mapi id 15.20.6455.028; Wed, 7 Jun 2023 09:01:27 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ec0e52f2-0511-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1686128505; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=BbHVqC8Fc2JYs6Fc+MVl7kF3al+4sK+IegdfOfo/jNo=; b=gA3RCi8Wr6OqA9UGl9elmD7pNMWvpGRpoOJU9OkeEfOP9tE/HsBuNIxi UosHKo6CWFNocMJt+cOTddtMbua45BovDjJsgvpEHf+aNACWfR67pFPT9 foLmjHXaFC1HQLhMUW0nELcQDYSSknAzFC3GEGaClSt9CropwgM3JWl0m k=; X-IronPort-RemoteIP: 104.47.57.176 X-IronPort-MID: 114390415 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:pnFtQKwjbOMgwcAwNd56t+enxyrEfRIJ4+MujC+fZmUNrF6WrkUFn 2RMUGqOa/aCamX3ft1ybou2/UwB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j8zEnCv5a6854Cd3AIV0k2hD0JcTpzX3cGMzWvQvECZe uhz/sCgwDlVWUcb8y9CHVAd+/fp+fTnJajTQ8aCwUh4AyuiyrtzLLhCRCX0joXTjsKmN4ZgC P4uj28wp/mn+Cwyxfa2WOWx5NKmOH5wt8GKN2QhtMTIjDMjB/tQIh6QbWNsB08venqwlc3l9 vnpQsmIq1ImjvsV1DwhSGo9xjr0T4o5XOn4ViEgUH7qci8YD4hEcJOia9QbxOcsiMbzZhB+Z MO+1jcm4tcDBvGkii4z9/UVytynk7xhXY5i+Ycg1FWTINbQr5Mqo40+l9TDf47bVTHwbFiNN MrINDX5f5Qf1/fR3fFvlN3yNjpZXg3FgfueDlxhuWllxxt2FxpxUoRw8IS2l0a8ogmdpVC7+ PYdox1ibBnVKYtHO1ALdZEZfHyJn3GQBrKPm7XC0/gDrs7N3XErIOyyKkp5dutZIcDwPIJ6d j8uWtjxC8Pkn/VeI2zNMUhyGGPfIz9Z0Wh9ihm3ek2hlWmL4CbcxFqSzgV4ridSrskc4jmss 2ISexr6s/YXBfT8LlyrnLDsuFpWB8jue0uy6MGsgG107b2A7yvkNDnW9DuA5eoOQoYewrEcw s+tX7IVY990nw= X-Talos-CUID: 9a23:QnXvSWFLduBkbdxjqmJcrFU5I/wYQ0bGj0fOD2C+O0ZAY5+sHAo= X-Talos-MUID: 9a23:MPQjog/18O/MgpqGNuel7zKQf+c3xbX/Mn0TqKsLgPieMzRqfAa20DviFw== X-IronPort-AV: E=Sophos;i="6.00,223,1681185600"; d="scan'208";a="114390415" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EDyfLN1Kj7WFdfN+aUBmS5Zj0XN0b6+hpqCYASK+58G6/2JWxL7Oijn66AkpwStbMsu1YLc5chxaCbXwqq4TnadsinGSCxtTXRxmMn2eQPiArOQe4bpfhi/po7L1nyqjwRZpy03c0A37KSW5rzjkv9lwLreZfvJVrl/BQyWMwCExsv0lz8gvSVn+SSk8VRsk1K77JAas/krL/imvpzs1l55v3QbkbMtdLhkoitL4YTH+rXcAH6lwXJdioT3FcaxGU9yxATU/EHVvjWp84115g+lrT3ABET1wO1hCIpDQCzON1TAmQbZvDNbNntpC+CQ/kfHUGNAjr0IQy/Q8+YYCAQ== 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=k+APwtEMbwH8K+zNBUg7BHZBWWxyyOMBtV/ndUDuzRQ=; b=EFQAGIl3iMMztXdnlvMzcZJkQH7ly3GGF9eJ1rBKjoTnsec8t7rpCghxEZSBJ3fytZ9IFc8JcO6Xx5q9R0Fr0zGSjmCJA0jsETwrV84R5jE7jcJKxa5+mBlGdDNinkRR8KEglmz0qmZy+5YbJixyiWWA07wC96UAy9B/naMKTohV1CcJAgRFUiM6lgscCCFnauoUcpOffg3saBH+xi/mlv+aRo5er2rBXdQJo7i+/VQiQKaULIzUKlk98/Jhsm2eswlhWA4JOXUBnrOrvzl0Wg+xl7ZHBo1fUtrO/vnY4PSYYqR+vI6PAQW4muZ7SBFBoSOZjINCaKAahlQfk/g/cQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k+APwtEMbwH8K+zNBUg7BHZBWWxyyOMBtV/ndUDuzRQ=; b=cTNqdzt1OycpNu04dX4YWhmgKkqspn+v/pwXxgtplM/KxlFOBbqkWRsHe0RGJZuiD/Udo4cnD/lUgue/4otoBrWWYTfRJ9XmrQNTBIeQ1zelS3HrxBywr8OlqnpLtJ/mJ7LEqGWv/Fre5MQ4edVHsMDMMe0C70Zp2mIb9Ny6Ves= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Jan Beulich , Andrew Cooper , Wei Liu , Julien Grall Subject: [PATCH v2] livepatch: apply_alternatives() is only used for livepatch Date: Wed, 7 Jun 2023 11:01:20 +0200 Message-Id: <20230607090120.49597-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.40.0 X-ClientProxiedBy: LO2P123CA0040.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600::28) To SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6423:EE_|SJ0PR03MB5951:EE_ X-MS-Office365-Filtering-Correlation-Id: cd4cc189-5439-47ee-1d2e-08db6735c731 X-LD-Processed: 335836de-42ef-43a2-b145-348c2ee9ca5b,ExtAddr,ExtFwd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BBnAN6ZEWMUTg1Op8grMaaFgDYNzwaF32ELHZAvi0QveTqGT6ZjoUe9fzccTwOP6FRNIbrF5nnNBwM13P2AEFho9b6cZndXsCfJ3PcfASrANPjLxFoAQrODvz0Q7MiWg6ZZ2TBgxdWQZrbINbX3LrY3PJCGVsPdjhqUhZ9+uyKEmjTYCWG9KvdsMja8lY61ubBGxJhnQtDOzotvceMPjfahYnHzkI51D1m8iqLIU0h3itu8wRUJmlI/uys7wC4/GkCXwG/PQ/WxR7AFkbyZOJieQKAzJ1p0T/kW0O4ShwbzokcIWZzewPKSVU5OrzFTa29e3k8oZ64SVptYJUEl1/o1MW2vX1QcSpGfG+ouN/5QZmeMleLWM/gztb2TnYZtyZ0zq69YAHmleTLi8wvA0wVOADcU1uscGoxGmcIWuZu59BYYI+s8xShCZI3u4TZBGsGaGgCtYj8skfYGDRNx1em5jj8nTOBiym5qBLKgQzyml2SSjIen8BCo7JR8xne7gHFhj2ECEVKEKPH9nU87xbyWEGNT/SpyY2tHBEVJcWpQEex3pcz9lMHdbEL3oRwZA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6423.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(451199021)(6486002)(6666004)(186003)(2616005)(83380400001)(86362001)(36756003)(38100700002)(82960400001)(6512007)(1076003)(6506007)(26005)(6916009)(316002)(54906003)(8676002)(4326008)(66946007)(66556008)(8936002)(66476007)(5660300002)(478600001)(41300700001)(2906002)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kWoFfA+LH+RKl7YbKmMtsShusrmd?= =?utf-8?q?fZkzNM+RJbjIUqrv6/oUEH212Gch23t9Tviwh3vO+ndQCUVteMvfeWBUHvgHOO7CT?= =?utf-8?q?ur8YXEw5UkhtdmSQkINK+LQuqwja7kmsEW5dRX0pUPm++er505zL3W7P3jqm2t67L?= =?utf-8?q?pRRLl2yu4kdy4dxiBC8OTdTGzQL3QAWbnvPVn6B4qXNVQqcBQ45DWcO8gOq0QQvCO?= =?utf-8?q?m+8s6YnRPxsgL5t3F11mVCmtWgA6lV3cByHJM26WbXEvOCiLG+0pQxQiBeCPDV757?= =?utf-8?q?nSMjtvYc/iXQtkgKnZ1GnDfRGU/8dlqvEeHefpTi8m603RYf/S+FhuWOzEj4LW0Ax?= =?utf-8?q?n+zjl4k6E0AiT7KWjuq5YpatSM9bf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3U/7LAE/lTx1eAkU2cT+ab+gUp2H77ybqBL7pEhOEBl7DpUYOXM8pI/9/GyB95x40l5VLzj8kYPJUWf/BfjnR3FtHHosLfIPwIRG7ITqLOj3mnut6SjE3umWHVK9rPeXG69NzcX6x5iD5bCng/I2oiUXiLoRkEFYV7SGvhi4n4b7Jn6X+W8krkLibthYQ7i+qRB8bqTmqMtYCw/d56M8Qw/6oWiZspJfiqBGWvYp7GouRsm+aUK0S/WobWXW/fCn3VLF9HuqTfLXZkYYCUnmifv436pK7NQUNj2GpPAbdlUmNuCrExGXOj6NppUFaHA6sJcWHBLVo7qSy3EU3Eg= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd4cc189-5439-47ee-1d2e-08db6735c731 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6423.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 09:01:27.8491 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hU47qv9j9KySBz5yd5o52eb4puz7h4Q7819C/1CMooXCt74Zxq0nUvQXDA7cKFUbYbYqTJoE8BEl5qi8Tz4R2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR03MB5951 Guard it with CONFIG_LIVEPATCH. Note alternatives are applied at boot using _apply_alternatives(). Signed-off-by: Roger Pau MonnĂ© Reviewed-by: Julien Grall Reviewed-by: Jan Beulich --- Changes since v1: - Do not guard function prototypes. --- Andrew raised a valid point of moving the prototype to a common header, but since I'm not longer touching the prototypes I'm not introducing such header here. --- xen/arch/arm/alternative.c | 2 ++ xen/arch/x86/alternative.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c index 7366af4ea646..016e66978b6d 100644 --- a/xen/arch/arm/alternative.c +++ b/xen/arch/arm/alternative.c @@ -223,6 +223,7 @@ void __init apply_alternatives_all(void) vunmap(xenmap); } +#ifdef CONFIG_LIVEPATCH int apply_alternatives(const struct alt_instr *start, const struct alt_instr *end) { const struct alt_region region = { @@ -232,6 +233,7 @@ int apply_alternatives(const struct alt_instr *start, const struct alt_instr *en return __apply_alternatives(®ion, 0); } +#endif /* * Local variables: diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c index 99482766b51f..21af0e825822 100644 --- a/xen/arch/x86/alternative.c +++ b/xen/arch/x86/alternative.c @@ -358,11 +358,12 @@ static void init_or_livepatch _apply_alternatives(struct alt_instr *start, } } -void init_or_livepatch apply_alternatives(struct alt_instr *start, - struct alt_instr *end) +#ifdef CONFIG_LIVEPATCH +void apply_alternatives(struct alt_instr *start, struct alt_instr *end) { _apply_alternatives(start, end, true); } +#endif static unsigned int __initdata alt_todo; static unsigned int __initdata alt_done;