mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] kconfig: error on reverse range
@ 2026-10-14 13:40 Julian Braha
  2026-10-14 13:40 ` [PATCH v2 1/2] kconfig: add prop_err function to simplify property error handling Julian Braha
  2026-10-14 13:40 ` [PATCH v2 2/2] kconfig: error on reverse range Julian Braha
  0 siblings, 2 replies; 3+ messages in thread
From: Julian Braha @ 2026-10-14 13:40 UTC (permalink / raw)
  To: nathan, nsc
  Cc: n.schier, grahamr, rdunlap, nico, linux-kbuild, linux-kernel,
	Julian Braha

This series adds more input validation to Kconfig, specifically checking
that ranges for numeric options are properly ordered. This check was
originally introduced as part of kconfirm [1], but there are no findings
for this across the tree, so the check can be added directly into Kconfig.

Patch 1/2 adds a prop_err() function to match the existing prop_warn(),
which is then used in patch 2/2 where the check is introduced.

[1] https://lore.kernel.org/all/20260904220559.GB2787252@ax162/
---
Changes since v1:
- fix typo in commit message: where -> there (Nicolas)
- adjust warning and error printing to match gcc (Nicolas)
- handle case with multiple (conditional) ranges (sashiko)

Link to v1:
https://lore.kernel.org/linux-kbuild/20260922163749.2031594-1-julianbraha@gmail.com/
---
Julian Braha (2):
  kconfig: add prop_err function to simplify property error handling
  kconfig: error on reverse range

 scripts/kconfig/menu.c                        |  49 +++++---
 .../tests/err_num_reverse_range/Kconfig       | 111 ++++++++++++++++++
 .../tests/err_num_reverse_range/__init__.py   |   8 ++
 .../err_num_reverse_range/expected_stderr     |  11 ++
 .../tests/err_transitional/expected_stderr    |   2 +-
 5 files changed, 166 insertions(+), 15 deletions(-)
 create mode 100644 scripts/kconfig/tests/err_num_reverse_range/Kconfig
 create mode 100644 scripts/kconfig/tests/err_num_reverse_range/__init__.py
 create mode 100644 scripts/kconfig/tests/err_num_reverse_range/expected_stderr

-- 
2.55.0


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

end of thread, other threads:[~2026-10-14 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 13:40 [PATCH v2 0/2] kconfig: error on reverse range Julian Braha
2026-10-14 13:40 ` [PATCH v2 1/2] kconfig: add prop_err function to simplify property error handling Julian Braha
2026-10-14 13:40 ` [PATCH v2 2/2] kconfig: error on reverse range Julian Braha

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®