Re: [PATCH] kbuild: detect module name collisions between '-' and '_'

From: Nicolas Schier

Date: Sat Nov 07 2026 - 08:17:15 EST


On Tue, 03 Nov 2026 12:04:11 +0100, Hamdy Abou El Anein wrote:
> Kbuild converts hyphens to underscores in KBUILD_MODNAME, and the module
> loader treats both characters as equivalent. However, modules-check.sh
> compares module basenames without normalization. Consequently, modules
> named foo-bar.o and foo_bar.o pass the conflict check even though they
> have the same effective module name.
>
> Normalize basenames before checking for duplicates, and use awk to show
> the original module paths in diagnostics. Preserve detection of exact
> duplicates and leave distinct names unaffected.
>
> [...]

Applied to kbuild/linux.git (kbuild-next-unstable), with 'Fixes:' tag added, thanks!

[1/1] kbuild: detect module name collisions between '-' and '_'
https://git.kernel.org/kbuild/c/bc348949

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers).

Patches applied to the kbuild-next-unstable branch are accepted pending
wider testing in linux-next and any post-commit review; they will
generally be moved to the kbuild-next branch in about a week if no
issues are found.

Best regards,
--
Nicolas