diff options
| author | Julian Braha <julianbraha@gmail.com> | 2026-09-15 22:15:07 +0100 |
|---|---|---|
| committer | Nathan Chancellor <nathan@kernel.org> | 2026-09-17 16:31:00 -0700 |
| commit | 54f11924e4854177b357af499ebc447dc8c3c590 (patch) | |
| tree | 6ea314db8eff33127e6a2826ad2b31f5cc6d7f74 /tools/lib/python/kdoc/python_version.py | |
| parent | d13bad83d89d1022fee254c08f6e01084eb4395e (diff) | |
| download | linux-next-54f11924e4854177b357af499ebc447dc8c3c590.tar.gz linux-next-54f11924e4854177b357af499ebc447dc8c3c590.zip | |
kconfig: prevent out-of-bounds user input for numeric options
Currently, user input of out-of-bounds values for 'int' and 'hex' options
is possible, leading to later silent failures in Kconfig if that value is
used in a comparison, or a warning by GCC or error by Clang if used in the
C code.
Let's factor out the out-of-bounds check on constants, so that it can be
reused for checking user input.
The frontend will now reject an attempted user input of an out-of-bounds
numeric value, similarly to how a value outside the active 'range' already
does.
For migration of existing configurations, a .config file with an
out-of-bounds numeric value will be allowed for now, but will warn the
user when read in by confdata.c
Assisted-by: LLM
Signed-off-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Nicolas Schier <n.schier@fritz.com>
Link: https://patch.msgid.link/20260915211508.291790-5-julianbraha@gmail.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
