From: Priyanshu Singh <singhpriyanshu9838@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nsc@kernel.org>,
Julian Braha <julianbraha@gmail.com>,
"Yann E . MORIN" <yann.morin.1998@free.fr>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kconfig: warn about malformed KCONFIG_SEED values
Date: Fri, 27 Nov 2026 02:23:54 +0000 [thread overview]
Message-ID: <32727766-89ae-4e23-ae39-635f7c0c9a6c@gmail.com> (raw)
In-Reply-To: <179564821041.3369856.2083626361406656618.b4-reply@b4>
Hi Nathan,
Thanks for taking a look and for the feedback.
On 11/25/26 23:10, Nathan Chancellor wrote:
> - Most people are just going to be using a previously generated
> KCONFIG_SEED; can these issues happen with the default logic?
Yes, in two ways when replaying a previously generated seed:
1. On 32-bit hosts, randconfig generates a full unsigned 32-bit seed
(0x0..0xFFFFFFFF). Half of those default-generated seeds
(>= 0x80000000) overflow 32-bit signed strtol() and quietly clamp
to 0x7FFFFFFF on replay instead of reproducing the original config.
2. Even on 64-bit hosts, copy-pasting a printed KCONFIG_SEED from a
build log or CI report with an accidental trailing space (or typo)
silently discards the seed and falls back to gettimeofday() with
status 0 and no warning, while leading whitespace is accepted
(asymmetric behavior).
I suspect it hasn't shown up in reports because the silent fallback to
0x7FFFFFFF or a clock seed just looks like a normal randconfig run that
failed to reproduce.
That being said, I completely agree v1 was heavier than warranted for
this (especially the test file). Once the 0b check is dropped and the
tests are trimmed per Julian's review, the C change is quite small and
brings KCONFIG_SEED in line with the existing warning for
KCONFIG_PROBABILITY.
Thanks,
Priyanshu
next prev parent reply other threads:[~2026-11-27 2:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 7:15 [PATCH] kconfig: warn about malformed KCONFIG_SEED values Priyanshu Singh
2026-11-25 23:10 ` Nathan Chancellor
2026-11-25 23:40 ` Julian Braha
2026-11-27 2:23 ` Priyanshu Singh [this message]
2026-11-25 23:30 ` Julian Braha
2026-11-27 1:59 ` Priyanshu Singh
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=32727766-89ae-4e23-ae39-635f7c0c9a6c@gmail.com \
--to=singhpriyanshu9838@gmail.com \
--cc=julianbraha@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=yann.morin.1998@free.fr \
/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