Introducing kconfirm
From: Julian Braha
Date: Sun Apr 05 2026 - 13:08:33 EST
Hi everyone! And happy easter to those who celebrate.
Today I'm making a proper announcement of some tooling I've been
building around Kconfig: meet kconfirm!
Code available here: https://github.com/julianbraha/kconfirm
Originally, the project started out as a new attempt at detecting unmet
dependency bugs using SMT solving. While that part is not yet ready for
release, the prototype has already detected 1 unmet dependency that
Kismet missed! See that patch here:
https://lore.kernel.org/all/20260325001522.1727678-1-julianbraha@xxxxxxxxx/
During development, I started noticing lots of dead code in the various
Kconfig files throughout the kernel.
For example, kconfirm currently detects 736 duplicate dependencies in
Linux 7.0-rc6. So far, I've hand-verified about 100 of them, and found
no false alarms. I've been slowly sending out patches for these, but
help is welcome! And if you discover any false alarms, please let me know.
Of the types of dead code, the most critical seems to be the dead
default statements. These look to me like the code *should not be dead*.
I've prioritized these and already sent out patches for them:
https://lore.kernel.org/all/20260405161545.161006-1-julianbraha@xxxxxxxxx/
https://lore.kernel.org/all/20260323123536.1413732-1-julianbraha@xxxxxxxxx/
https://lore.kernel.org/all/20260323124118.1414913-1-julianbraha@xxxxxxxxx/
Additionally, I added an optional check to visit all of the links in the
Kconfig help texts. kconfirm has discovered 82 unique dead links (after
de-duplication). I am probably not the right person to update many of
these, so I would appreciate the community's help here. You can find the
list of dead links here:
https://lore.kernel.org/all/6732bf08-41ee-40c4-83b2-4ae8bc0da7cf@xxxxxxxxx/T/#u
kconfirm runs in just a few seconds (about 2.5s on my laptop) and is
written in Rust. I hope to build much more tooling around Kconfig in the
future, such as a proper linter and LSP that integrates these checks.
If you use kconfirm, I would appreciate it if you could give the tool
credit in your patches.
E.g.: "This dead code was detected by kconfirm, a static analysis tool
for Kconfig." Unless the maintainers have some other preferred format.
Finally, if you value this work, please consider sponsoring me on
Liberapay, or GitHub Sponsors so that I can devote more time to this:
1. Liberapay: https://liberapay.com/julianbraha
2. GitHub Sponsors: https://github.com/sponsors/julianbraha
Once I've finished the SMT solving, I will release v1.0.
Best regards,
Julian Braha