diff options
| author | Julian Braha <julianbraha@gmail.com> | 2026-09-15 22:15:08 +0100 |
|---|---|---|
| committer | Nathan Chancellor <nathan@kernel.org> | 2026-09-17 16:31:01 -0700 |
| commit | 9b8719973ee2c5ec23aab9b958e5c6fbdf352f90 (patch) | |
| tree | 82d1111180bf1c72b62b1e5fb8501b0d5fc3c29a /scripts/Makefile.vmlinux | |
| parent | 54f11924e4854177b357af499ebc447dc8c3c590 (diff) | |
| download | linux-next-9b8719973ee2c5ec23aab9b958e5c6fbdf352f90.tar.gz linux-next-9b8719973ee2c5ec23aab9b958e5c6fbdf352f90.zip | |
kconfig: use unsigned integers for hex range checks
While 'hex' values should use the bounds of 64-bit unsigned integers, the
range values are treated as signed (checks use strtoll).
For example:
config HEX_RANGE
hex
range 0 0xfffffffffffffffe
default 0xffffffffffffffff
the default value should adjust down to the upper bound of
0xfffffffffffffffe, but since the check incorrectly parses both as
LLONG_MAX, the value stays at the out-of-range default of
0xffffffffffffffff.
To fix this, let's use a union of signed and unsigned integers to
represent both 'int' and 'hex' range values, then use both strtoll and
strtoull where appropriate.
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-6-julianbraha@gmail.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts/Makefile.vmlinux')
0 files changed, 0 insertions, 0 deletions
