summaryrefslogtreecommitdiff
path: root/include/linux/execmem.h
diff options
context:
space:
mode:
authorRan Xiaokai <ran.xiaokai@zte.com.cn>2026-01-15 06:15:36 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-02-01 01:22:37 +0300
commit77bcee8d4015a1191e1e3f5c5c51589086493ab0 (patch)
tree794e903d8b0ad2ae6359d076a2c71715b9ec0629 /include/linux/execmem.h
parentd468d8f86d80383e52ab6cf59e916b9f5578d46a (diff)
downloadlinux-77bcee8d4015a1191e1e3f5c5c51589086493ab0.tar.xz
alloc_tag: fix rw permission issue when handling boot parameter
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. 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. Link: https://lkml.kernel.org/r/20260115031536.164254-1-ranxiaokai627@163.com Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn> Suggested-by: Suren Baghdasaryan <surenb@google.com> Acked-by: Suren Baghdasaryan <surenb@google.com> Cc: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/execmem.h')
0 files changed, 0 insertions, 0 deletions