mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] kconfig: randconfig: fix 32-bit KCONFIG_SEED replay and add validation
@ 2026-12-01  6:22 Priyanshu Singh
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Priyanshu Singh @ 2026-12-01  6:22 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: Julian Braha, Yann E . MORIN, linux-kbuild, linux-kernel,
	Priyanshu Singh

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-01  6:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01  6:22 [PATCH v2 0/2] kconfig: randconfig: fix 32-bit KCONFIG_SEED replay and add validation Priyanshu Singh
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

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®