<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/scripts/kconfig/tests/warn_num_bounds/__init__.py, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/scripts/kconfig/tests/warn_num_bounds/__init__.py?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/scripts/kconfig/tests/warn_num_bounds/__init__.py?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-09-17T23:31:00Z</updated>
<entry>
<title>kconfig: prevent out-of-bounds user input for numeric options</title>
<updated>2026-09-17T23:31:00Z</updated>
<author>
<name>Julian Braha</name>
<email>julianbraha@gmail.com</email>
</author>
<published>2026-09-15T21:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=54f11924e4854177b357af499ebc447dc8c3c590'/>
<id>urn:sha1:54f11924e4854177b357af499ebc447dc8c3c590</id>
<content type='text'>
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 &lt;julianbraha@gmail.com&gt;
Reviewed-by: Nicolas Schier &lt;n.schier@fritz.com&gt;
Link: https://patch.msgid.link/20260915211508.291790-5-julianbraha@gmail.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
</feed>
