Message ID | 04a0d5550f331d68f7eab4b512d50978712f989e.1643475473.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=<UNKNOWN>) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JmLKh6mftz9t25 for <incoming@patchwork.ozlabs.org>; Sun, 30 Jan 2022 04:04:56 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JmLKh5WMVz3dnD for <incoming@patchwork.ozlabs.org>; Sun, 30 Jan 2022 04:04:56 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=csgroup.eu (client-ip=2a01:111:f400:7e19::61f; helo=fra01-mr2-obe.outbound.protection.outlook.com; envelope-from=christophe.leroy@csgroup.eu; receiver=<UNKNOWN>) Received: from FRA01-MR2-obe.outbound.protection.outlook.com (mail-mr2fra01on061f.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e19::61f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JmLGx245tz3bSk for <linuxppc-dev@lists.ozlabs.org>; Sun, 30 Jan 2022 04:02:33 +1100 (AEDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PzdIMkfYAmkDVNuC5iZTEa+JF/y3u6ACtcnoxro3KRT/FsrF5zKNrnMnkzuOFk89GL+uL29u5dH6qvJEG8+RTEbtlIEORha6L3aK9S4sFXoLc5TL+Eyns70Jnm9AYgEiErXcyTW/LulCOcVmZp9GPMtpgxYJOljvMCkmc7346Z3dHefuK03Cup/TpJkT4u5g1CIhrAS10BLmXo5Wz9cr1zpnMq37PMJMQoBGJlSZX8iMhWVBDS7pc0kczRWHbB7Og05pslfZeeJUHPfopaQV8QhfrFNG6WZhK+DL6HOXDenmqRa+86AYl2JCSPh672Ayw9Zup23FFIgHqO8SOWXsmQ== 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=hDmVjj830CtXExXD123euZ+os2WqKPyfIrNuhETOUf0=; b=GmBMH1vQPoffveeJA/PM3mu66uzJI8l3WPBZBVGMB/y/JtmkzqjdbnubmxOcG2djLuuhURUDMFDQoaH7uPCo9Qjh7s2wcxN6QfHc01iJZ9zAvrYYTGe4MonFxfYjP81sqoLM7ZehJ9Go+nXpDgrm+GekIUO/jNJz0c6W8qSnIUcO6EXro+ZduaBzPviQ8QTdDPAwYm50y8Ik7Llht7J6bfQEaMYBPUN43ZbW5pejks9bsG4Iodd4qCX+/N57RJYjszzSNQ4H1tG45nthmh+SbY1c+odwTKyJRGJNrLr4PZiLH+AsFkDQWzAHYh6/LQwboduK4re8mb/D3sG4nMUohw== 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:14 +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:14 +0000 From: Christophe Leroy <christophe.leroy@csgroup.eu> To: Luis Chamberlain <mcgrof@kernel.org>, Jessica Yu <jeyu@kernel.org> Subject: [PATCH v3 6/6] powerpc: Select ARCH_WANTS_MODULES_DATA_IN_VMALLOC on book3s/32 and 8xx Thread-Topic: [PATCH v3 6/6] powerpc: Select ARCH_WANTS_MODULES_DATA_IN_VMALLOC on book3s/32 and 8xx Thread-Index: AQHYFTH2Z+9BZHr+mkubHJQ6ewTMHg== Date: Sat, 29 Jan 2022 17:02:14 +0000 Message-ID: <04a0d5550f331d68f7eab4b512d50978712f989e.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: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=csgroup.eu; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c8448cf0-569c-4b8b-c1a8-08d9e3491907 x-ms-traffictypediagnostic: PR0P264MB2584:EE_ x-microsoft-antispam-prvs: <PR0P264MB25847AFC69401D65E4663A16ED239@PR0P264MB2584.FRAP264.PROD.OUTLOOK.COM> x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iwv5BXfDzUnohE3Dhxxj3ViUEOzp38nRo/dx/VgebUiBPwRV9YmfDJbKwgK6+r4yiqqWejLAao2JiSi38V40BrAL2jiV36cPOHBxFW7+/lBX5/yriRbsohIMXTfuTN2hzlIqQVKsAHGhp33IioH/W2YkuJtJl9D6ljuhQR7uo7h98qLjk/V/bHiyLyTRuZh4k2ytLgiu90u9DFIe0S3K7ByVv3VFeeSjeV+PNHbdXTJeap3QfOg5bnUXLWfK5kDmcKGz2aduCSu+qHbk+j4GzKfycFqAOVFS+SQ742DNj9NbcI3u5PVW9WMzmn5QUggMgKQnE5w3o1DCE9/+ngAWa2N8cIXonrpvNHytzGUiWcjlPrSjXspJ53xsLAYQEDOmSaaw6Ftq3lJM1s1agvzVINB+I+fENd52KLy0qKVwWbzaoNmEHEIFkf1sajYzqn7GcCF1nbbIWGIHuHsQbkB8UruowWYZuxuu+8iboawcu0AOlIq1hmk/A+PoVUoL0Yg3uzDishAkdhfZi0KrrNtC2VBxHXJ67/pZOgAuQRy6m3tWjLG35cxoMY+2Yy4rYm2/o09kxI7ujAevof/XCR8K9mOAW0glv2leh0Q3tWgZMZH5q1RFwBScWLF5dmhFnu+r0Io4cvHl6GY23JbZudnXxc8V6GFEadJtWkrQNwuyGnm8G+qzV/67a0RCfK1xxsc962Ofb/5VCQzYUCGXolleQwjvXPDS0VwHuLVQcQ9cVOY= 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)(7416002)(36756003)(38070700005)(32563001)(20210929001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?j73f71ns0JUnRc3p8L3L7g8?= =?iso-8859-1?q?Z4IvNoRIeizCMijE2bSQI4DpV3pUISSxIMvmzb1QiLYfaneeZY6SxfvVc38a?= =?iso-8859-1?q?UbQJ4IG/vBvgeXZnp77QiDlCsY5CzwyiejteFq/OG/nLKmFLKzc0Grz2cQhE?= =?iso-8859-1?q?bQkiwDhmtCHaRCqiLtfuefpZlGqaOMMu/OKkZgwEOcPKatp9+Gf6bENwAUSe?= =?iso-8859-1?q?YMUFx8MksOVwlqGr76wkLEQ4Q84nAIHEBpwM3xF4Cjfnz6z1R9jW96Uwu5WD?= =?iso-8859-1?q?2PJBpbbx29y2PzR2Wgl5STsbRSjAxyfKAq6DsssLpsmtzRmN5L7DWpUAk63G?= =?iso-8859-1?q?C2+aaocPyJVO7JlXAwQqGS5m2Ym5bC0veMAmaRPAZY1wxIh4VDIBqNRHtUSa?= =?iso-8859-1?q?0BZZsyalFKycBwBAVoZWsAPn+0QOcL01AZwkS+mgmiFa7Q9kjdcNYXNDQpaj?= =?iso-8859-1?q?tDYNyzz+tf9JnaqCO4UQUB2WZcfc2Eepa/U5vPwhUert/GMlLz3dBMIhr9Uq?= =?iso-8859-1?q?HK0hITi0BTTOEJid/rqqXQ56ttalTeyXIp08TpJHYTZ+bE9+vrlrX3SHkmmx?= =?iso-8859-1?q?jWUnzMDDsCw7BrF91l2KFsjE276J4nmv/5QpQPB5kNTfruNrjYhR05FnYh6v?= =?iso-8859-1?q?J42QAUCjpsf/eZBp0kv4q/ywLniv6gnF9VryRl255wgY71486gVzn1JbtQ0z?= =?iso-8859-1?q?6be01uot6JB+KI02meSVAp37objuh2K4xdlrKcx+TbpX3mkEwwSNdUwEoWfu?= =?iso-8859-1?q?9mOTp1CHJsc2q3/h4expdtXeYqCKoaF54ab/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yynz+40Q?= =?iso-8859-1?q?XXjDXHsSIACrTukK0iZ/E408g9otiAm/yQL8fQ7x1qHxTsBWsQmrHAFX7Siz?= =?iso-8859-1?q?pTbY=3D?= 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: c8448cf0-569c-4b8b-c1a8-08d9e3491907 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2022 17:02:14.0755 (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: 6djKFQr0cHMhrf6Tp+sNdDrT700aVyYKZ+t5IOoSqzEcz7ADs6/oGc5Y6d9B96S1UVn3cQi5o4s5j6QmgEjsM9VVhqWgKvn1wakt6iQfqC8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB2584 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev/> List-Post: <mailto:linuxppc-dev@lists.ozlabs.org> List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe> Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>, "kgdb-bugreport@lists.sourceforge.net" <kgdb-bugreport@lists.sourceforge.net>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, Paul Mackerras <paulus@samba.org>, "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org> Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" <linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
Allocate module text and data separately
|
expand
|
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/github-powerpc_selftests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_ppctests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_clang | success | Successfully ran 7 jobs. |
snowpatch_ozlabs/github-powerpc_kernel_qemu | success | Successfully ran 24 jobs. |
snowpatch_ozlabs/github-powerpc_sparse | success | Successfully ran 4 jobs. |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b779603978e1..242eed8cedf8 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -152,6 +152,7 @@ config PPC select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IRQS_OFF_ACTIVATE_MM select ARCH_WANT_LD_ORPHAN_WARN + select ARCH_WANTS_MODULES_DATA_IN_VMALLOC if PPC_BOOK3S_32 || PPC_8xx select ARCH_WEAK_RELEASE_ACQUIRE select BINFMT_ELF select BUILDTIME_TABLE_SORT
book3s/32 and 8xx have a separate area for allocating modules, defined by MODULES_VADDR / MODULES_END. On book3s/32, it is not possible to protect against execution on a page basis. A full 256M segment is either Exec or NoExec. The module area is in an Exec segment while vmalloc area is in a NoExec segment. In order to protect module data against execution, select ARCH_WANTS_MODULES_DATA_IN_VMALLOC. For the 8xx (and possibly other 32 bits platform in the future), there is no such constraint on Exec/NoExec protection, however there is a critical distance between kernel functions and callers that needs to remain below 32Mbytes in order to avoid costly trampolines. By allocating data outside of module area, we increase the chance for module text to remain within acceptable distance from kernel core text. So select ARCH_WANTS_MODULES_DATA_IN_VMALLOC for 8xx as well. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+)