From: Christian Brauner <brauner@kernel.org>
To: lirongqing <lirongqing@baidu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
Kees Cook <kees@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH] fs/coredump: reduce redundant log noise in validate_coredump_safety
Date: Wed, 22 Apr 2026 14:44:11 +0200 [thread overview]
Message-ID: <20260422-naschen-einbog-ed4f52ea472a@brauner> (raw)
In-Reply-To: <20260410080918.2319-1-lirongqing@baidu.com>
On Fri, Apr 10, 2026 at 04:09:18AM -0400, lirongqing wrote:
> From: Li RongQing <lirongqing@baidu.com>
>
> Currently, writing to 'core_pattern' or 'suid_dumpable' sysctl nodes
> always triggers validate_coredump_safety(), even if the values have
> not changed. This results in redundant warning messages in dmesg:
>
> "Unsafe core_pattern used with fs.suid_dumpable=2..."
>
> This patch optimizes the procfs handlers to only invoke the safety
> validation when an actual change in the configuration is detected:
>
> 1. In proc_dostring_coredump(), compare the new core_pattern string
> with the existing one using strncmp().
> 2. In proc_dointvec_minmax_coredump(), check if the new suid_dumpable
> value differs from the previous one.
>
> This keeps the kernel log clean from repetitive warnings when
> re-applying the same sysctl settings.
>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
That warning should very much serve as a reminder to not use that
completely unsafe pattern. So no, move to newer coredump infra or use
absolute paths, please.
prev parent reply other threads:[~2026-04-22 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 8:09 [PATCH] fs/coredump: reduce redundant log noise in validate_coredump_safety lirongqing
2026-04-22 0:34 ` 答复: " Li,Rongqing(ACG CCN)
2026-04-22 12:44 ` Christian Brauner [this message]
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=20260422-naschen-einbog-ed4f52ea472a@brauner \
--to=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lirongqing@baidu.com \
--cc=viro@zeniv.linux.org.uk \
/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