[PATCH v2 0/2] kconfig: randconfig: fix 32-bit KCONFIG_SEED replay and add validation
From: Priyanshu Singh
Date: Tue Dec 01 2026 - 01:24:41 EST
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