<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/scripts/kconfig, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/scripts/kconfig?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/scripts/kconfig?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-10-11T00:14:08Z</updated>
<entry>
<title>localmodconfig: Explicitly report boolean configs during integrity check</title>
<updated>2026-10-11T00:14:08Z</updated>
<author>
<name>Aaron Tomlin</name>
<email>atomlin@atomlin.com</email>
</author>
<published>2026-09-25T18:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=46d4ccf3b621368af5e98187e9e21dccd8beb5cc'/>
<id>urn:sha1:46d4ccf3b621368af5e98187e9e21dccd8beb5cc</id>
<content type='text'>
When running make localmodconfig, streamline_config.pl reads loaded
modules and maps each module object to its corresponding Kconfig
symbol(s) using repository Makefiles.

In several instances, a loaded module corresponds to an object
controlled by a boolean symbol (e.g. config FOO declared as bool), or is
a composite module that depends on a boolean configuration. Because
boolean options only accept "=y" or disabled, they cannot be configured
as loadable modules ("=m").

Previously, if such a symbol was not already built-in ("=y") in the
baseline configuration, the final integrity check emitted an ambiguous
diagnostic. For example

    foo did not have configs CONFIG_FOO

Further investigation is required by developers to determine whether the
module was out-of-tree, its dependencies were unmet, or it failed due to
a type constraint. Address this by:
    1.  Tracking symbol types in a %types hash during Kconfig parsing.

    2.  Enhancing the final integrity check when running localmodconfig
        (!$localyesconfig) to explicitly annotate boolean symbols.

For example:

    module cec did not have configs CONFIG_CEC_CORE (tristate) CONFIG_RAS_CEC (boolean, not supported with =m)

Signed-off-by: Aaron Tomlin &lt;atomlin@atomlin.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: https://patch.msgid.link/20260925181230.130525-1-atomlin@atomlin.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: use the value argument in sym_get_near_range_bound()</title>
<updated>2026-10-09T20:31:53Z</updated>
<author>
<name>Leizhen Zhang</name>
<email>lzsx618@gmail.com</email>
</author>
<published>2026-10-08T16:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=a8f72a75b38a153d32a59b2ebca1d7079db1dd1a'/>
<id>urn:sha1:a8f72a75b38a153d32a59b2ebca1d7079db1dd1a</id>
<content type='text'>
sym_get_near_range_bound() is meant to check whether the given value is
outside of the active range of an int/hex symbol, and is called with the
symbol's current value from sym_calc_value() and with the default value
from sym_get_string_default().

Since commit 9b8719973ee2 ("kconfig: use unsigned integers for hex range
checks") it ignores its value argument and uses the current value of the
symbol (via sym_get_range_val()) instead. As a result, an out-of-range
default is no longer clamped in sym_get_string_default(), and
savedefconfig writes out values that are equal to the effective default
again, for example CONFIG_A=4 for:

  config A
  	int "a"
  	range 1 4
  	default 8

The existing savedefconfig_range test did not catch this because it only
covers symbols without a prompt.

Parse the value argument again, and add a test case for a symbol with a
prompt.

Found while fuzzing Kconfig input with ASan/UBSan.

Fixes: 9b8719973ee2 ("kconfig: use unsigned integers for hex range checks")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Leizhen Zhang &lt;lzsx618@gmail.com&gt;
Tested-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Link: https://patch.msgid.link/20261008164540.3686383-1-lzsx618@gmail.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: fix infinite loop in conf_choice() when no choice value is visible</title>
<updated>2026-10-09T20:30:48Z</updated>
<author>
<name>Leizhen Zhang</name>
<email>lzsx618@gmail.com</email>
</author>
<published>2026-10-08T16:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=52f26261e27dbdb7c6dea75d8f1a92ea805b2c58'/>
<id>urn:sha1:52f26261e27dbdb7c6dea75d8f1a92ea805b2c58</id>
<content type='text'>
If a choice is visible but none of its choice values is, conf_choice()
counts cnt == 0 visible values and finds no default. When the choice has
to be asked, e.g. because a new symbol was added to the same menu
(oldconfig, syncconfig) or because stdin is at EOF (oldaskconfig), the
loop that maps the answer to a menu entry never finds one and the
while (1) loop repeats forever, printing "choice[1-0?]: 0" each time.

This happens in the tree for s390 when the compiler supports none of the
-march=z* options (e.g. a non-s390 host compiler), so that all values of
the "Processor type" choice are invisible:

  $ make ARCH=s390 defconfig
  $ sed -i '/^CONFIG_NR_CPUS=/d' .config
  $ make ARCH=s390 oldconfig     # hangs

Before the removal of tristate choice support, conf_choice() returned
early in this case. Do the same when there is no visible choice value.

Found by fuzzing Kconfig input with ASan/UBSan.

Fixes: fde192511bdb ("kconfig: remove tristate choice support")
Assisted-by: Claude:claude-opus-5-5 libFuzzer
Signed-off-by: Leizhen Zhang &lt;lzsx618@gmail.com&gt;
Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Tested-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Link: https://patch.msgid.link/20261008164521.3684735-1-lzsx618@gmail.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: cleanup stale comment about 'keys' array</title>
<updated>2026-10-09T20:29:34Z</updated>
<author>
<name>Julian Braha</name>
<email>julianbraha@gmail.com</email>
</author>
<published>2026-10-09T09:46:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=2160297cabd4bd121ef2e7327c6a6f376c0fbf3c'/>
<id>urn:sha1:2160297cabd4bd121ef2e7327c6a6f376c0fbf3c</id>
<content type='text'>
'keys' was removed from 'dialog_textbox' in:
commit e14f1242a8be ("kconfig: menuconfig: simplify global jump key assignment")
but the comment referencing it was never removed.

Let's cleanup this stale comment.

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/20261009094617.17322-1-julianbraha@gmail.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: tests: {old,save}defconfig: Forward dynamic keyword arguments</title>
<updated>2026-09-30T13:45:29Z</updated>
<author>
<name>Nicolas Schier</name>
<email>n.schier@fritz.com</email>
</author>
<published>2026-09-29T07:59:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=34f3b447600bcc56ae7c4d10db8dac754ad05357'/>
<id>urn:sha1:34f3b447600bcc56ae7c4d10db8dac754ad05357</id>
<content type='text'>
Let kconfig test framework forward dynamic keyword arguments for
'olddefconfig' and 'savedefconfig' and update the _run_conf() calls in
warn_changed_input to use the corrsponding wrappers instead.

The warn_changed_input test needed to use _run_conf() as the
{old,save}defconfig wrapper did not provide the necessary flexibility
for common calls.  With dynamic keyword arguments, there is no need to
use the framework-internal _run_conf() any more.

Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Signed-off-by: Nicolas Schier &lt;n.schier@fritz.com&gt;
Link: https://patch.msgid.link/20260929-kconfig-tests-minor-updates-v2-4-c5902bee1d0c@fritz.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: tests: warn_changed_input: Simplify by reusing the extra env</title>
<updated>2026-09-30T13:45:28Z</updated>
<author>
<name>Nicolas Schier</name>
<email>n.schier@fritz.com</email>
</author>
<published>2026-09-29T07:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ecc9c2b15a04b9bdbbc61eab738d685a2fb0dcd8'/>
<id>urn:sha1:ecc9c2b15a04b9bdbbc61eab738d685a2fb0dcd8</id>
<content type='text'>
Define the extra environment once and re-use it for the respective
_run_conf() calls to increase readability.

Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Signed-off-by: Nicolas Schier &lt;n.schier@fritz.com&gt;
Link: https://patch.msgid.link/20260929-kconfig-tests-minor-updates-v2-3-c5902bee1d0c@fritz.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: tests: Provide defconfig outfile for savedefconfig</title>
<updated>2026-09-30T13:45:28Z</updated>
<author>
<name>Nicolas Schier</name>
<email>n.schier@fritz.com</email>
</author>
<published>2026-09-29T07:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=09bd92ba15bd00d937deea38a10a439458393043'/>
<id>urn:sha1:09bd92ba15bd00d937deea38a10a439458393043</id>
<content type='text'>
Let kconfig test framework's 'savedefconfig' forward the requested
output 'defconfig' filename to 'conf'.

The original implementation was calling 'conf' with '--savedefconfig'
but missed the mandatory filename for the defconfig output file.

While at it, honour the 'dot_config' argument which points to the input
config file.

Fixes: 022a4bf6b59d ("kconfig: tests: add framework for Kconfig unit testing")
Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Signed-off-by: Nicolas Schier &lt;n.schier@fritz.com&gt;
Link: https://patch.msgid.link/20260929-kconfig-tests-minor-updates-v2-2-c5902bee1d0c@fritz.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: tests: Reset all KCONFIG_* env variables by default</title>
<updated>2026-09-30T13:45:28Z</updated>
<author>
<name>Nicolas Schier</name>
<email>n.schier@fritz.com</email>
</author>
<published>2026-09-29T07:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=8688f0b29d021cad8188b11d5664b4a1f595691b'/>
<id>urn:sha1:8688f0b29d021cad8188b11d5664b4a1f595691b</id>
<content type='text'>
Reset all environment variables with names starting with 'KCONFIG_' from
the user-provided environment.

This fixes the 'warn_changed_input' test on systems with
KCONFIG_WARN_CHANGED_INPUT=1 and ensures a cleaner test environment.

Fixes: 645323a7f4e5 ("kconfig: add optional warnings for changed input values")
Signed-off-by: Nicolas Schier &lt;n.schier@fritz.com&gt;
Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Link: https://patch.msgid.link/20260929-kconfig-tests-minor-updates-v2-1-c5902bee1d0c@fritz.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: Add "def_string", "def_int" and "def_hex"</title>
<updated>2026-09-24T15:37:05Z</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-09-19T00:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=651fb291c4c86b7be96720b129ef4619fbcef53c'/>
<id>urn:sha1:651fb291c4c86b7be96720b129ef4619fbcef53c</id>
<content type='text'>
Kconfig has offered "def_bool" and "def_tristate" as a shorthand for a
type definition plus a default since before the git era, but has never
offered the equivalent for the other three types. Conor Dooley ran into
this gap[1] when fixing a symbol that had been given the wrong type:

  Unfortunately, there is no such thing as "def_string", but in this
  case we can use "default" to propagate the value of ...

Nothing in the grammar requires the restriction. The rule that consumes
a default is already type agnostic. Add the three missing types. No
changes are needed to existing diagnostics. E.g. declaring a symbol
"bool" and then assigning it with "def_string" still reports

  warning: ignoring type redefinition of 'CONFLICT' from 'bool' to 'string'

Added tests for the types.

Build tested ARCH=x86_64 with GCC 16.2.0. Tests pass with "make testconfig".

Link: https://lore.kernel.org/all/20230111104848.2088516-1-conor.dooley@microchip.com/ [1]
Assisted-by: LLM
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Tested-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Link: https://patch.msgid.link/20260919005929.4077729-1-kees@kernel.org
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: warn about malformed KCONFIG_PROBABILITY values</title>
<updated>2026-09-24T15:30:42Z</updated>
<author>
<name>Dmitrii Tulnov</name>
<email>tulnov.dl@gmail.com</email>
</author>
<published>2026-09-18T21:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=9f01cd3a324390b235c67ae4ca3d35085369ebdd'/>
<id>urn:sha1:9f01cd3a324390b235c67ae4ca3d35085369ebdd</id>
<content type='text'>
randconfig checks the numeric range of each probability but does not
validate where strtol() stops. For example, KCONFIG_PROBABILITY=50% is
accepted as 50:0:0: the '%' is parsed repeatedly as zero. For the
documented value 50, tristate y/m/n probabilities are 25%/25%/50%.
With 50%, both y/m probabilities silently become zero, reducing the
coverage of random configuration builds. Empty fields and extra fields
are also accepted.

Warn when the value does not follow the documented decimal format. For
malformed inputs whose parsed probabilities are in range, preserve the
existing interpretation unless KCONFIG_WERROR is set. In that case, exit
with an error before writing the configuration. Leading whitespace and
signs are accepted by strtol(), but also trigger the warning because they
are outside the documented format.

Keep the strtol() result as long until the range check. This rejects
out-of-range values that narrowing to int previously made valid, such as
4294967296 becoming zero on a 64-bit host, regardless of KCONFIG_WERROR.

Add regression tests for one warning per malformed input, preserved
configurations, KCONFIG_WERROR, out-of-range values, the supported
probability formats, and the documented empty-value default.

Fixes: e43956e60769 ("kconfig: implement KCONFIG_PROBABILITY for randconfig")
Assisted-by: LLM
Signed-off-by: Dmitrii Tulnov &lt;tulnov.dl@gmail.com&gt;
Tested-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Reviewed-by: Julian Braha &lt;julianbraha@gmail.com&gt;
Link: https://patch.msgid.link/20260918213430.3-1-tulnov.dl@gmail.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
</feed>
