From: Priyanshu Singh <singhpriyanshu9838@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>
Cc: Julian Braha <julianbraha@gmail.com>,
"Yann E . MORIN" <yann.morin.1998@free.fr>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Priyanshu Singh <singhpriyanshu9838@gmail.com>
Subject: [PATCH v2 0/2] kconfig: randconfig: fix 32-bit KCONFIG_SEED replay and add validation
Date: Tue, 1 Dec 2026 06:22:08 +0000 [thread overview]
Message-ID: <20261201062210.88995-1-singhpriyanshu9838@gmail.com> (raw)
This v2 series splits the KCONFIG_SEED fixes and validation into two
patches per review feedback from Julian Braha:
1. Patch 1/2 is a minimal bugfix switching strtol() to strtoull() so
32-bit hosts stop clamping seeds >= 0x80000000 to LONG_MAX
(0x7FFFFFFF).
2. Patch 2/2 adds malformed-format warnings, KCONFIG_WERROR enforcement,
clock-seed fallback for negative, unparseable, and ERANGE inputs,
backward-compatible trailing whitespace and non-negative modulo 2^32
preservation when KCONFIG_WERROR is unset, and regression tests under
scripts/kconfig/tests/randconfig_seed/.
Changes in v2:
- Split into a 2-patch series.
- Dropped 0b/0B binary prefix rejection and C23 notes.
- Dropped the (unsigned int) cast in `seed = val;`.
- Listed negative values in the malformed input bullet list in
patch 2/2's commit message.
- Trimmed scripts/kconfig/tests/randconfig_seed/__init__.py from 222
lines down to 112 lines.
Both patches pass `make testconfig` (34/34 after patch 1/2, 39/39 after
patch 2/2).
Priyanshu Singh (2):
kconfig: randconfig: parse KCONFIG_SEED with strtoull()
kconfig: randconfig: validate KCONFIG_SEED and add tests
scripts/kconfig/conf.c | 33 +++++-
scripts/kconfig/tests/randconfig_seed/Kconfig | 44 +++++++
.../kconfig/tests/randconfig_seed/__init__.py | 112 ++++++++++++++++++
3 files changed, 186 insertions(+), 3 deletions(-)
create mode 100644 scripts/kconfig/tests/randconfig_seed/Kconfig
create mode 100644 scripts/kconfig/tests/randconfig_seed/__init__.py
--
2.53.0
next reply other threads:[~2026-12-01 6:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 6:22 Priyanshu Singh [this message]
2026-12-01 6:22 ` [PATCH v2 1/2] kconfig: randconfig: parse KCONFIG_SEED with strtoull() Priyanshu Singh
2026-12-01 6:22 ` [PATCH v2 2/2] kconfig: randconfig: validate KCONFIG_SEED and add tests 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=20261201062210.88995-1-singhpriyanshu9838@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
all inboxes | Powered by JetHome®