From patchwork Mon Dec 9 03:12:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13898768 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 3B6D1E77173 for ; Mon, 9 Dec 2024 03:13:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AC8886B0382; Sun, 8 Dec 2024 22:13:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A78A66B0384; Sun, 8 Dec 2024 22:13:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 966FA6B0386; Sun, 8 Dec 2024 22:13:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 78D3A6B0382 for ; Sun, 8 Dec 2024 22:13:02 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id EDE031C6095 for ; Mon, 9 Dec 2024 03:13:01 +0000 (UTC) X-FDA: 82873947534.20.92052F5 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf12.hostedemail.com (Postfix) with ESMTP id 6E5114000C for ; Mon, 9 Dec 2024 03:12:51 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf12.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733713971; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=1i/wIz8FENk4pqEi5FCZIFTT2WSlImyB3FNpDT2Te+Y=; b=BXHtAy2wqUyh5NR0ebMi/WRnVsRmQtVZWXgvOGUDCOLlqNSqIBPOVhd+JFOfxKlaAjvNDp +MPQICZwbi2aref3ddYjw20VRaiDlz911watTjVHRfPT5NAuFtVPBVKzyH7wxCKXgQiiJz wXpmRe3xfXFtGAfAPHr1QZskjVkXPlk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733713971; a=rsa-sha256; cv=none; b=8VjnvPGUJNer/WIkCYlnpbrN8HQTSMH5AdopUcFYFdkwT01oiFfUCOtYFv7MtNhlyAuP/M WvmxYzN0HSzSTiPpVknJ0DwPvI04x62iP8kA0TpXd8IZSOdFHrMIkEn2LE68G9zzKsAs7/ /VCu5rCvOd+8APkKVm+Jv2IE33HJvs4= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf12.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 30181143D; Sun, 8 Dec 2024 19:13:27 -0800 (PST) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.16.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 98D073F58B; Sun, 8 Dec 2024 19:12:56 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Andrew Morton , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/execmem: Make ARCH_WANTS_EXECMEM_LATE depend on EXECMEM Date: Mon, 9 Dec 2024 08:42:51 +0530 Message-Id: <20241209031251.515903-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Stat-Signature: ef5pqrmzyk8aqfdq3oidobm7a3bcx59g X-Rspamd-Queue-Id: 6E5114000C X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1733713971-806498 X-HE-Meta: U2FsdGVkX1/Udn2MnK/P3tMkOHbmCq+EtFU3x6fkuBLcmKj2Y1yogmyhuIipjBDoLkz2EacHagZpmX58FdGhS9pOHldqfgx3FQaBcPxN8nsLkb1zPfjxgyDtuqyQI51UAyqXfQ+OrzrSW3fA0kMZml7+ktL1zTQB+bjwnGpf6iHsTSvdcBDIv/TFYjAPs9cU+nkykFBkcNWNHDV28lZTFjOlNa+gnRDXkEc5M7ddxXAsQZx1nCD44NCH82Y7LLXbxCnL1fSmGSHPiQWmmGAf088L4edGmEID0IakjQtyPwrShYjha/ivj0FWGVyEz61bILaHLYKiP4Y1xmy92z7dZz1Hsknljt/cYt7fQp1uk/CB26ylz6NfH5DQ0+2f0vs1xLuMFJr3ihCxkWbW3H8sOLSAnXbkkUB2DWxZY1x6Sxlbz1cE7avYLdWtSGxqk8mcHey8jgvQVm8RySo2ANu2DHo5wnXmBFSq1IDih/gU6uz/qU/yq6v/7oS22CRbDwbU/IdSutYpD1LTkdMrmwXscGbb4rsQhSTUv3e8/9hgGrBPueoDUwiqxHvKIWs8VJtxL8AtqPAMB/VbgbAqYtN3UyMnwbGRFrAEQlJI90w23WVvI6nHgfG31i6pvqEteP9pp+X4nglYCiThkZiE+7mpcQfdjpR2HJp8UBp0liSp3vB61zzCqyiKvai/WurbjC2ilLN0lL51OxUBniFsbabk9931YxjKhj3+VoM6QlYUeVLaprCghBJ3rqxO35QX43Kbxevoq8h3uHa3YUNc6z7i9HeTdTbAHoljNHRqzsXWsTN6KQaPsAzyMDkKNUYp+hmoA9SwBwW2r4qYvciUk75roK9ztoWTpEQNwgHZtqOcugCL2Rx9C/IRmPv7d1g80Wtb4yZjiL4Kty5ocedV8pbJLj8Vjg+kOJRm335YusqT7BGKxR55wV6YLReXYeP7QV3QjmBf2MuHnhqj9Y3mcZB CYcbkWdd LN1X6RkPlwKtLy8S5fp+oKFYYbpccfhb2W0iUJWI7Z5WwjEFe+SzNkhZTnDQvP/0z6RGDKFr4ZOolOQoPAw8gkvQWs2oOgLumEPoiDr5vFofdmDzSrbQNHUeVfY4S5X1pUHSKyczV/pmi4yxf7LAgyPhV6FQoTxZmSN6NvmoU2zA7uA+hlMg5uW71KULCN0UNJ+NSTA7IMVklrVNyHvXLZsGJQBdnJO7IrWQpoJo5bEXBojSWL6IOgtHzFzwvaGMishkE3MK5tZ1WuX0PtuQKgaWDNrtUC4O009nMuWcbdS280jMzJwnWgtVyyKD1vebPgNVvq2dyoLTuSTwX764RNnB103J0InI+Qtp00+PiP/DfVfWNfRONxf1/D0+ufaatzZJrpBZQS97jM2fFNZLRzQJ9YnL9lNveqFNW+Xj5TR9Dz38yni8lJDbRjK0TV1f2BsM8g0T3s0+Muf6Ez1qbMR5sweHNyYm8ANQxk70jyTWh37It0UldG9ayQj9avJEhhbTNhXg9m1S10m3h8YDh2NCzZehBvDXbyK1BhnJGfvxUc2UNT7R5ZnhM9NzKOaLwEGwa 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: List-Subscribe: List-Unsubscribe: Late initialisation of EXECMEM inherently requires EXEMEM itself, and hence this dependency should not be left with the subscribing platforms. Cc: Catalin Marinas Cc: Will Deacon Cc: Andrew Morton Cc: Kees Cook Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- This patch applies on v6.13-rc1 arch/Kconfig | 1 + arch/arm64/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 6682b2a53e34..17716f32dc44 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1058,6 +1058,7 @@ config ARCH_WANTS_MODULES_DATA_IN_VMALLOC config ARCH_WANTS_EXECMEM_LATE bool + depends on EXECMEM help For architectures that do not allocate executable memory early on boot, but rather require its initialization late when there is diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b5479c8b454c..b146372bc365 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -113,7 +113,7 @@ config ARM64 select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_HUGE_PMD_SHARE if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36) select ARCH_WANT_LD_ORPHAN_WARN - select ARCH_WANTS_EXECMEM_LATE if EXECMEM + select ARCH_WANTS_EXECMEM_LATE select ARCH_WANTS_NO_INSTR select ARCH_WANTS_THP_SWAP if ARM64_4K_PAGES select ARCH_HAS_UBSAN