From: Kees Cook <kees@kernel.org>
To: Julian Braha <julianbraha@gmail.com>
Cc: nathan@kernel.org, nsc@kernel.org, corbet@lwn.net,
skhan@linuxfoundation.org, arnd@arndb.de,
stefan.hengelein@fau.de, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
nico@fluxnic.net, officialnaumansabir@gmail.com,
rdunlap@infradead.org, vegard.nossum@oracle.com, tj@kernel.org
Subject: Re: [PATCH] Documentation: warn users not to use select on choice options in Kconfig
Date: Wed, 15 Jul 2026 21:19:28 -0700 [thread overview]
Message-ID: <202607152119.BF8E377B@keescook> (raw)
In-Reply-To: <20260715220149.48700-1-julianbraha@gmail.com>
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@app.fastmail.com/
>
> 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@gmail.com>
Yeah, it'd be good to add a checkpatch or even build-time check too.
Reviewed-by: Kees Cook <kees@kernel.org>
--
Kees Cook
next prev parent reply other threads:[~2026-07-16 4:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 22:01 [PATCH] Documentation: warn users not to use select on choice options in Kconfig Julian Braha
2026-07-16 4:19 ` Kees Cook [this message]
2026-07-16 6:04 ` Julian Braha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202607152119.BF8E377B@keescook \
--to=kees@kernel.org \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=julianbraha@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nico@fluxnic.net \
--cc=nsc@kernel.org \
--cc=officialnaumansabir@gmail.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=stefan.hengelein@fau.de \
--cc=tj@kernel.org \
--cc=vegard.nossum@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox