Re: [PATCH] Documentation: warn users not to use select on choice options in Kconfig

From: Kees Cook

Date: Thu Jul 16 2026 - 00:19:37 EST


On Wed, Jul 15, 2026 at 11:01:49PM +0100, Julian Braha wrote:
> Hengelein's master thesis about Kconfig from 2015 wrote that 'select'
> does not work on member options inside of a 'choice'.
>
> So I've re-implemented his check as part of kconfirm:
> https://github.com/julianbraha/kconfirm
>
> and discovered several instances of these dead selects in use, and
> fixing them is not always trivial. For example, see:
> https://lore.kernel.org/all/a3b7a752-8cc4-492a-bb62-43121b852c41@xxxxxxxxxxxxxxxx/
>
> Let's add a warning to the documentation (a place where developers
> are more likely to see it than a master's thesis...)
>
> Signed-off-by: Julian Braha <julianbraha@xxxxxxxxx>

Yeah, it'd be good to add a checkpatch or even build-time check too.

Reviewed-by: Kees Cook <kees@xxxxxxxxxx>

--
Kees Cook