lkml.org 
[lkml]   [2019]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] kbuild: check uniqueness of module names
On Sat, May 18, 2019 at 01:07:15AM +0900, Masahiro Yamada wrote:
> In the recent build test of linux-next, Stephen saw a build error
> caused by a broken .tmp_versions/*.mod file:
>
> https://lkml.org/lkml/2019/5/13/991
>
> drivers/net/phy/asix.ko and drivers/net/usb/asix.ko have the same
> basename, and there is a race in generating .tmp_versions/asix.mod
>
> Kbuild has not checked this before, and it suddenly shows up with
> obscure error message when this kind of race occurs.
>
> Non-unique module names cause various sort of problems, but it is
> not trivial to catch them by eyes.
>
> Hence, this script.
>
> It checks not only real modules, but also built-in modules (i.e.
> controlled by tristate CONFIG option, but currently compiled with =y).
> Non-unique names for built-in modules also cause problems because
> /sys/modules/ would fall over.
>
> I tested allmodconfig on the latest kernel, and it detected the
> following:
>
> warning: same basename if the following are built as modules:
> drivers/regulator/88pm800.ko
> drivers/mfd/88pm800.ko
> warning: same basename if the following are built as modules:
> drivers/gpu/drm/bridge/adv7511/adv7511.ko
> drivers/media/i2c/adv7511.ko
> warning: same basename if the following are built as modules:
> drivers/net/phy/asix.ko
> drivers/net/usb/asix.ko
> warning: same basename if the following are built as modules:
> fs/coda/coda.ko
> drivers/media/platform/coda/coda.ko
> warning: same basename if the following are built as modules:
> drivers/net/phy/realtek.ko
> drivers/net/dsa/realtek.ko
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Kees Cook <keescook@chromium.org>
> Reviewed-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

\
 
 \ /
  Last update: 2019-05-19 19:53    [W:1.127 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site