From: Petr Mladek <pmladek@suse.com>
To: Kaitao Cheng <kaitao.cheng@linux.dev>
Cc: akpm@linux-foundation.org, rostedt@goodmis.org,
andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk,
senozhatsky@chromium.org, linux-kernel@vger.kernel.org,
Kaitao Cheng <chengkaitao@kylinos.cn>
Subject: Re: [PATCH] lib/vsprintf: Require exact hash_pointers mode matches
Date: Thu, 21 May 2026 13:52:16 +0200 [thread overview]
Message-ID: <ag7x8GoL_G-eOtVc@pathway.suse.cz> (raw)
In-Reply-To: <20260519130117.48097-1-kaitao.cheng@linux.dev>
On Tue 2026-05-19 21:01:17, Kaitao Cheng wrote:
> From: Kaitao Cheng <chengkaitao@kylinos.cn>
>
> hash_pointers= accepts a small set of mode strings, but the parser uses
> strncmp() with the length of each valid mode. That accepts values with
> trailing garbage, such as hash_pointers=autobots or
> hash_pointers=nevermind, as valid aliases for auto and never.
>
> Use strcmp() so that only the documented mode strings are accepted.
> Invalid values will continue to fall back to auto through the existing
> unknown-mode path.
>
> Signed-off-by: Kaitao Cheng <chengkaitao@kylinos.cn>
LGTM:
Reviewed-by: Petr Mladek <pmladek@suse.com>
I am going to queue this patch via the printk tree early next
week unless anyone complains in the meantime.
Best Regards,
Petr
next prev parent reply other threads:[~2026-05-21 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 13:01 [PATCH] lib/vsprintf: Require exact hash_pointers mode matches Kaitao Cheng
2026-05-21 11:52 ` Petr Mladek [this message]
2026-05-26 9:13 ` Petr Mladek
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=ag7x8GoL_G-eOtVc@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=chengkaitao@kylinos.cn \
--cc=kaitao.cheng@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
/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