lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpG=FsWar2jXXNAaRCWZf6UA8_Pw0QGAOTcf0=tbV_MeDg@mail.gmail.com>
Date: Wed, 14 Jan 2026 21:47:25 -0800
From: Suren Baghdasaryan <surenb@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: ranxiaokai627@....com, kent.overstreet@...ux.dev, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, ran.xiaokai@....com.cn
Subject: Re: [PATCH v2] alloc_tag: fix rw permission issue when handling boot parameter

On Wed, Jan 14, 2026 at 8:58 PM Suren Baghdasaryan <surenb@...gle.com> wrote:
>
> On Wed, Jan 14, 2026 at 7:23 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
> >
> > On Thu, 15 Jan 2026 03:15:36 +0000 ranxiaokai627@....com wrote:
> >
> > > From: Ran Xiaokai <ran.xiaokai@....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?
>
> If debug is enabled we don't want the users toggling profiling on and
> off because all allocations made while profiling is off will have no
> tags. If used later enables profiling and these allocations get freed,
> each one will prodice a warning about missing tag. We want to avoid
> that by disallowing to toggle this control at runtime when debugging
> is enabled.
>
> > Documentation/mm/allocation-profiling.rst provided no hint.
>
> True. I'll post a patch to add that limitation there with description why.

Documentation update is posted at
https://lore.kernel.org/all/20260115054557.2127777-1-surenb@google.com/

>
> >
> > > 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@...gle.com>
> > > Acked-by: Suren Baghdasaryan <surenb@...gle.com>
> > > Signed-off-by: Ran Xiaokai <ran.xiaokai@....com.cn>
> >
> > Should we backport it?
>
> I'm not sure a single boot time warning produced only in debug mode
> warrants backporting. Do you think we should do it anyway?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ