From nobody Mon Dec 15 23:27:41 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECC262D73B2 for ; Mon, 15 Dec 2025 15:47:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765813661; cv=none; b=isncF4fls4YPMSdJm7KV70XwH5k98e2gXvSbWueeseqp3jIanFBYtQlw3DdKIcMEEgTe/U6XAhARbkN6gV8FSIaDX2BZjNURYOx8b8PbL3WhBdqZfZW4qZYwXaUbi1zrpIeyF6k1LqnCWfYCinAgIOhNyl5Jxmyn6C+xZwjE/dc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765813661; c=relaxed/simple; bh=LDUL2rRv2z6sqgcL/GxlNcgNQGncefAQrlvxFNU0nqA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=bk8kiNvVXglTv3XkKINjpLaNvn5Ez9WIVlWG2szptsjA5K+fwRK5+D7YObanwCbT8J33JxSn6fh4vI6tqfhuyXM9bAJmcblpaRvJti11OwqdmwJkkbXewkR1dhHstdNZwi3RbT1rvPgyWep0TgZafbiOReDnUHim5512rxZ4O5k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b78SMpZ5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b78SMpZ5" Received: by smtp.kernel.org (Postfix) with ESMTPS id 73D41C4CEF5; Mon, 15 Dec 2025 15:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765813660; bh=LDUL2rRv2z6sqgcL/GxlNcgNQGncefAQrlvxFNU0nqA=; h=From:Date:Subject:To:Cc:From; b=b78SMpZ5eJSSU6aIEo06lB4Oe1T5SkgGjQYNhTwd8VBH0c4qdqlnWk8c4ae7beD32 qRl1FAZb7a6r19opiyHWSB8mHCSv8d4JFjMPC0rhNbR1XavzuCWf5PTsip2d0SmUD4 uktz3eertrjS6GZb9NfvURZbgqieJrofjxOiIwNm/LbnJgYQxWNlEgmcL7WgjNUq1X ndpaSE63q2YRPRoZx0cUkyTBMFZ0IGJzAl3fwhj0a2wYKD3affmpuagDovCC38HyRX iZoRjldO5OdJHDEoABn10O2fJ67bRRqSGvO9UXTVNkNldvJOZlFVM5qKB+H2s/I2GR 1pgxleArBod5A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B752D5B843; Mon, 15 Dec 2025 15:47:40 +0000 (UTC) From: Joel Granados Date: Mon, 15 Dec 2025 16:47:37 +0100 Subject: [PATCH] alloc_tag: move memory_allocation_profiling_sysctls into .rodata Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-jag-alloc_tag_const-v1-1-35ea56a1ce13@kernel.org> X-B4-Tracking: v=1; b=H4sIAJgtQGkC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1NDI0NT3azEdN3EnJz85PiSxPT45Py84hLdlGTLFPNk4zTzRIs0JaDOgqL UtMwKsKnRsbW1AMZQZlFlAAAA X-Change-ID: 20251215-jag-alloc_tag_const-dc9d7c3f7a8f To: Suren Baghdasaryan , Kent Overstreet , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joel Granados X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1430; i=joel.granados@kernel.org; h=from:subject:message-id; bh=LDUL2rRv2z6sqgcL/GxlNcgNQGncefAQrlvxFNU0nqA=; b=owJ4nAHtARL+kA0DAAoBupfNUreWQU8ByyZiAGlALZrSh2JjzWixeXMWIrdctFPERl6yyv4NN LiieH5jSdOOe4kBswQAAQoAHRYhBK5HCVcl5jElzssnkLqXzVK3lkFPBQJpQC2aAAoJELqXzVK3 lkFP/8UL/RsRUSRnehvvpzMWT0nhllOcXeF6+qvVoyOV8NZSqZkfmeCn4u9EIM6Ov8ThiHs8Yd9 SVo+BaVYsRqD4XPadAYoX7BcjpzhkHzESWjwQo2vjJRMjsGfP8W4WPTv+59w/WE+3cY0yOSmSy4 CO9VoV975iWwfysgWTmaTkNfOJZjwsVTPGWwgNrkX9wzBSXW15s1weqjWtx6MrA17T3BUEQsIiT Y6AtSyAe648ALEfaHeHnloxe+X5BcFNyjaYjr3hTk3myG5BoHdpemFobJzs8JUNSC5puAMRZA1c WL/lfm/sZDJjVxm8OpkOlY2VSrWj4R6QPNxMf1OrvKyqS38Z4mHg8yYmVmdjw616ZFooCy+7lTl rvUnfAMBAPN1Ry+6yDLMKfb7GGg0WdU/FTfzkqoc/AW8rfBoK+zHPPT31NOfGR9oQwkONpuSGw4 9zsDqvQU8bZVGO5VA5ivmovnSPdQfe+IT5sk8vxWqzhjTpeRuOPa6tXbWwuO2QcFPs7ryixJta5 Z4= X-Developer-Key: i=joel.granados@kernel.org; a=openpgp; fpr=F1F8E46D30F0F6C4A45FF4465895FAAC338C6E77 X-Endpoint-Received: by B4 Relay for joel.granados@kernel.org/default with auth_id=239 Remove the change in file mode permissions done before initializing the sysctl. It is not necessary as the writing of the kernel variable will be blocked by the proc_mem_profiling_handler when writing is disallowed (also controlled by mem_profiling_support). Signed-off-by: Joel Granados --- lib/alloc_tag.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c index 27fee57a5c91db8067c05bff974a9e801e0ef6a0..846a5b5b44a4e5f530605c97a20= 0e03260e73d77 100644 --- a/lib/alloc_tag.c +++ b/lib/alloc_tag.c @@ -783,7 +783,7 @@ static int proc_mem_profiling_handler(const struct ctl_= table *table, int write, } =20 =20 -static struct ctl_table memory_allocation_profiling_sysctls[] =3D { +static const struct ctl_table memory_allocation_profiling_sysctls[] =3D { { .procname =3D "mem_profiling", .data =3D &mem_alloc_profiling_key, @@ -798,9 +798,6 @@ static struct ctl_table memory_allocation_profiling_sys= ctls[] =3D { =20 static void __init sysctl_init(void) { - if (!mem_profiling_support) - memory_allocation_profiling_sysctls[0].mode =3D 0444; - register_sysctl_init("vm", memory_allocation_profiling_sysctls); } #else /* CONFIG_SYSCTL */ --- base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8 change-id: 20251215-jag-alloc_tag_const-dc9d7c3f7a8f Best regards, --=20 Joel Granados