Message ID | 344a86345b2ad9ec5ce69775c914e508b789b197.1643475473.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 285D6C4332F for <linux-mm@archiver.kernel.org>; Sat, 29 Jan 2022 17:02:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32D686B009C; Sat, 29 Jan 2022 12:02:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B57C6B009B; Sat, 29 Jan 2022 12:02:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0439F6B009C; Sat, 29 Jan 2022 12:02:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id E2CDD6B0098 for <linux-mm@kvack.org>; Sat, 29 Jan 2022 12:02:15 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9DD1F182371AF for <linux-mm@kvack.org>; Sat, 29 Jan 2022 17:02:15 +0000 (UTC) X-FDA: 79083942630.27.3C31B0D Received: from FRA01-MR2-obe.outbound.protection.outlook.com (mail-eopbgr90048.outbound.protection.outlook.com [40.107.9.48]) by imf31.hostedemail.com (Postfix) with ESMTP id E51682000C for <linux-mm@kvack.org>; Sat, 29 Jan 2022 17:02:12 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kfxnno3faHvx2fwiaznYxZtZy8CTLiUNu2yAfOdgGp1ZUaKP0cJAFCnVw1iOC8WsynOFdMieHkV/0/H/zd0xnHD/2bw9gHpB85GhN30dHZFbkB7Pa6Pq9RQrcWqDYKjnT8h1aF1dFeEviDIybgXfuNe532CwjYeF2yDw2wJ67rtRhM03rbU7oFY2bANDtNagOpok7yfMNZdwL09xsRr02bJhF3TrTbGQf5qv1RG8eeYutNcw88hlC67CIX2i7dZHpkxTs1zluL+bmmiP/oXcIpA+qn658GUTio/4Qbw0HJlO5PM9hZFu/LWM6awNrzLxDSbh6CZm4E5HV5ulCT6lUQ== 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=cSCVxbuJ7b2G/qI76FRabVmCoG6DxICmPOKkKXiqnaE=; b=XDFUgHhTCjrG9AaU2ADWqLJQIEuQkV3TiCvYvw0cGnwZlYw1MI0wkNS2pfNDYCU9APmTMX+92FOYL/12vwILKKpCRiDVMu+OT3UcNjxk2841Jy54zpCYeQAZvbx6Fjpa0re4k9fxOScBshC1lene3bIpa1KpM7HaJId5Z7ImKxtBEBAXNx/dRjglnbfEiPnhAEk41VMC3YZvLRyS7Tz/f2UiwoYpI5IOu2FVXIaNMD3ODyWNiprCt+pTlaXtqnZ6n9dKwlSmZ/S9NBhNTKRBH2K7U7+U/S81v0dP/8XIGOkhkfnW3OgyTs7Y+kuWkEb1v1l+GR4/UMUpeCOqq/gp3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:31::15) by PR0P264MB2584.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1e3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Sat, 29 Jan 2022 17:02:11 +0000 Received: from MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::c9a2:1db0:5469:54e1]) by MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM ([fe80::c9a2:1db0:5469:54e1%6]) with mapi id 15.20.4930.020; Sat, 29 Jan 2022 17:02:11 +0000 From: Christophe Leroy <christophe.leroy@csgroup.eu> To: Luis Chamberlain <mcgrof@kernel.org>, Jessica Yu <jeyu@kernel.org> CC: Christophe Leroy <christophe.leroy@csgroup.eu>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>, "kgdb-bugreport@lists.sourceforge.net" <kgdb-bugreport@lists.sourceforge.net>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org> Subject: [PATCH v3 5/6] modules: Remove module_addr_min and module_addr_max Thread-Topic: [PATCH v3 5/6] modules: Remove module_addr_min and module_addr_max Thread-Index: AQHYFTH1Li2/03ycxU6FcE0z+2fkwA== Date: Sat, 29 Jan 2022 17:02:11 +0000 Message-ID: <344a86345b2ad9ec5ce69775c914e508b789b197.1643475473.git.christophe.leroy@csgroup.eu> References: <cover.1643475473.git.christophe.leroy@csgroup.eu> In-Reply-To: <cover.1643475473.git.christophe.leroy@csgroup.eu> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2b97d94e-295b-4230-011b-08d9e34917b6 x-ms-traffictypediagnostic: PR0P264MB2584:EE_ x-microsoft-antispam-prvs: <PR0P264MB2584BF5FDF4B95395449ED27ED239@PR0P264MB2584.FRAP264.PROD.OUTLOOK.COM> x-ms-oob-tlc-oobclassifiers: OLM:324; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: InQqnK9QVAeF9bJywjERHADoIiE8o2cRxckK/XoQTCMwdVTNe9zrDTyLo/pLwXwcV7FTbVfkPWLCEWgAOgts0E/KMzDIdsAuipa14KbD74ttbIX0ZPq5W/Bq/iLhsuSqTqzWOMnD64rFjnDx5ajFhWQKLeLcNx+7HShWWQBcCEBzO7N3sv1nO486gbC01MmSOC4Os5Y3+rU9z9/GX99lHUc3Skky4Zm/HgDBpvmJctUlVvZOEEs0GQPYhnRNPNHy/49wwx2A92dXbcDqCssxWntB9ZUUYAB5XknjRNEwYvFwTDl6+xs6a9C4R/aXc+F3HdowzFpZ8VmEotHTC90hHDzyfJxVRhi6f0RrI1gH5qXSyf1PDqmb1x18XSd5ko26EWWN2TEdclaEpUeMyA11y58/JuFTlLGOLhD2136LQUQit6YymL3DA3l4Gw9IGgW6fl6qkQ7qTZRwXimAG8DEBCH4ROpsnhLpB4iz4T9oomEbP+KqEC1CXchiSIbNKj9n+uFgvswJX5ZdsFsYgcXw7H+Ex9XLywhvfs8MuRlNADHQIIWnZ94kGYy2CEp/kUc16YGREQ241QV4CYoGDH63itmCyjKpVFzYL+LNxSGRvj/rzfyQqoJ5PeFJDc8jmnj8DVnMi96q8IkQ4eyWSbn0RFmdpfl0APoo8n+hMF7fU9x68d2NNlCVqU5Gbj7XH31BYaGcSPE7+xZK291AMy47Gw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(54906003)(110136005)(6512007)(2906002)(86362001)(6486002)(508600001)(4326008)(122000001)(38100700002)(91956017)(316002)(76116006)(26005)(64756008)(6506007)(8936002)(186003)(5660300002)(44832011)(66476007)(66556008)(71200400001)(66946007)(8676002)(66446008)(83380400001)(2616005)(36756003)(38070700005)(20210929001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso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?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: csgroup.eu X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MRZP264MB2988.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 2b97d94e-295b-4230-011b-08d9e34917b6 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2022 17:02:11.8932 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9914def7-b676-4fda-8815-5d49fb3b45c8 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BHuaWMVkOOayyz0OKKttULsn/RB4/NllPUFVoTG9KNJGl8vpGu+AIKmp8xUV5Q2YnDQQw5kef+QT08zK3nJ8Ti4AqcffDD1HLYF6LlK+iWc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB2584 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: E51682000C X-Stat-Signature: tcc54ssbsrauhr9megmp5oa8dcrz8j35 X-Rspam-User: nil Authentication-Results: imf31.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf31.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 40.107.9.48 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu X-HE-Tag: 1643475732-435785 X-Bogosity: Ham, tests=bogofilter, spamicity=0.034543, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Allocate module text and data separately
|
expand
|
diff --git a/kernel/module.c b/kernel/module.c index f3758115ebaa..01fdc9c8a5e2 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -89,7 +89,7 @@ * Mutex protects: * 1) List of modules (also safely readable with preempt_disable), * 2) module_use links, - * 3) module_addr_min/module_addr_max. + * 3) mod_tree.addr_min/mod_tree.addr_max. * (delete and add uses RCU list operations). */ static DEFINE_MUTEX(module_mutex); @@ -110,9 +110,6 @@ static struct mod_tree_root { .addr_min = -1UL, }; -#define module_addr_min mod_tree.addr_min -#define module_addr_max mod_tree.addr_max - #ifdef CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC static struct mod_tree_root mod_data_tree __cacheline_aligned = { .addr_min = -1UL, @@ -4611,14 +4608,14 @@ static void cfi_init(struct module *mod) mod->exit = *exit; #endif - cfi_module_add(mod, module_addr_min); + cfi_module_add(mod, mod_tree.addr_min); #endif } static void cfi_cleanup(struct module *mod) { #ifdef CONFIG_CFI_CLANG - cfi_module_remove(mod, module_addr_min); + cfi_module_remove(mod, mod_tree.addr_min); #endif }
Replace module_addr_min and module_addr_max by mod_tree.addr_min and mod_tree.addr_max Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- kernel/module.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)