From: <shao.mingyin@zte.com.cn>
To: <pjw@kernel.org>
Cc: <mikey@neuling.org>, <jiangfeng@kylinos.cn>, <palmer@dabbelt.com>,
<aou@eecs.berkeley.edu>, <alex@ghiti.fr>,
<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<zhang.yue5@zte.com.cn>, <david.laight.linux@gmail.com>,
<qingfang.deng@linux.dev>, <aurelien@aurel32.net>,
<troy.mitchell@linux.dev>
Subject: Re: [PATCH v4] riscv: lib: Fix ZBB strnlen wrap-around regression on huge counts
Date: Mon, 28 Sep 2026 11:35:18 +0800 (CST) [thread overview]
Message-ID: <20260928113518331HR61sfVYm8Lrb44vgAEuk@zte.com.cn> (raw)
In-Reply-To: <20260915152656708z04s4oSYY2BGj34F36RZa@zte.com.cn>
Hi Paul,
Gentle ping on this one - it has picked up more tags since posting, and
should be ready to be picked up:
Acked-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Troy Mitchell <troy.mitchell@linux.dev>
Suggested-by: David Laight <david.laight.linux@gmail.com>
Suggested-by: Qingfang Deng <qingfang.deng@linux.dev>
It stays a minimal fix: only the two boundary-computation instructions
in the ZBB path are replaced (18 insertions, 2 deletions, no new
registers), so the scanning loop itself is unchanged.
This one matters for stable - the regression is in v7.1.10+ and v7.2:
strnlen(s, SIZE_MAX) returns 8 for any 8+-byte aligned string and
truncates names built through FORTIFY strcat/strlcat (device-mapper's
sysfs name "live-base" becomes "live-bas"), which broke blivet/anaconda
installs and LVM on RISC-V systems. It has since been reproduced
independently on a Fedora 45 riscv64 image with ZBB enabled, where the
fix restores correct behaviour.
Cc: stable is set, and the minimal form should backport cleanly to
7.1.y. Happy to rebase onto riscv/fixes or adjust anything if needed.
Thanks,
Shao Mingyin
next prev parent reply other threads:[~2026-09-28 3:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 7:26 shao.mingyin
2026-09-22 3:48 ` Troy Mitchell
2026-09-25 20:54 ` Aurelien Jarno
2026-09-28 3:27 ` shao.mingyin
2026-09-28 3:35 ` shao.mingyin [this message]
2026-10-05 17:13 ` Paul Walmsley
2026-10-05 17:00 ` patchwork-bot+linux-riscv
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=20260928113518331HR61sfVYm8Lrb44vgAEuk@zte.com.cn \
--to=shao.mingyin@zte.com.cn \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=aurelien@aurel32.net \
--cc=david.laight.linux@gmail.com \
--cc=jiangfeng@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mikey@neuling.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=qingfang.deng@linux.dev \
--cc=troy.mitchell@linux.dev \
--cc=zhang.yue5@zte.com.cn \
/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
all inboxes | Powered by JetHome®