From: Andrew Morton <akpm@linux-foundation.org>
To: ranxiaokai627@163.com
Cc: surenb@google.com, kent.overstreet@linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, ran.xiaokai@zte.com.cn
Subject: Re: [PATCH v2] alloc_tag: fix rw permission issue when handling boot parameter
Date: Wed, 14 Jan 2026 19:23:36 -0800 [thread overview]
Message-ID: <20260114192336.9d98f0330bfd6c8638762dd0@linux-foundation.org> (raw)
In-Reply-To: <20260115031536.164254-1-ranxiaokai627@163.com>
On Thu, 15 Jan 2026 03:15:36 +0000 ranxiaokai627@163.com wrote:
> From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
>
> Boot parameters prefixed with "sysctl." are processed
> during the final stage of system initialization via kernel_init()->
> do_sysctl_args(). When CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled,
> the sysctl.vm.mem_profiling entry is not writable and will cause
> a warning.
This sounds strange. Why would setting a Kconfig debug thing disable
alteration of a runtime control?
Documentation/mm/allocation-profiling.rst provided no hint.
> Before run_init_process(), system initialization executes in kernel
> thread context. Use current->mm to distinguish sysctl writes during
> do_sysctl_args() from user-space triggered ones.
>
> And when the proc_handler is from do_sysctl_args(), always return success
> because the same value was already set by setup_early_mem_profiling()
> and this eliminates a permission denied warning.
>
> Suggested-by: Suren Baghdasaryan <surenb@google.com>
> Acked-by: Suren Baghdasaryan <surenb@google.com>
> Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Should we backport it?
next prev parent reply other threads:[~2026-01-15 3:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 3:15 ranxiaokai627
2026-01-15 3:23 ` Andrew Morton [this message]
2026-01-15 4:58 ` Suren Baghdasaryan
2026-01-15 5:47 ` Suren Baghdasaryan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260114192336.9d98f0330bfd6c8638762dd0@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ran.xiaokai@zte.com.cn \
--cc=ranxiaokai627@163.com \
--cc=surenb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox