Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-16 Thread Masahiro Yamada
Hi Kees, On Thu, May 16, 2019 at 3:38 AM Kees Cook wrote: > > On Thu, May 16, 2019 at 02:55:02AM +0900, Masahiro Yamada wrote: > > > > On Thu, May 16, 2019 at 1:20 AM Kees Cook wrote: > > > > > > On Wed, May 15, 2019 at 04:53:15PM +0900, Masahiro Yamada wrote: > > > > On Wed, May 15, 2019 at 4:4

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-16 Thread Masahiro Yamada
Hi Kees, On Thu, May 16, 2019 at 3:31 AM Kees Cook wrote: > > On Thu, May 16, 2019 at 03:07:54AM +0900, Masahiro Yamada wrote: > > On Wed, May 15, 2019 at 4:40 PM Masahiro Yamada > > wrote: > > > > > $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin > > > diff --git a/scripts/module

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-16 Thread Masahiro Yamada
Hi David, On Thu, May 16, 2019 at 6:00 PM David Laight wrote: > > From: Masahiro Yamada > > Sent: 15 May 2019 18:55 > ... > > > xargs basename -a -- | sort | ... > > > > Sorry for my ignorance, but could you > > teach me the effect of "--" ? > > > > I sometimes use "--" as a separator > > whe

RE: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-16 Thread David Laight
From: Masahiro Yamada > Sent: 15 May 2019 18:55 ... > > xargs basename -a -- | sort | ... > > Sorry for my ignorance, but could you > teach me the effect of "--" ? > > I sometimes use "--" as a separator > when there is ambiguity in arguments > for example, "git log -- " > > In this case, w

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Kees Cook
On Thu, May 16, 2019 at 02:55:02AM +0900, Masahiro Yamada wrote: > > On Thu, May 16, 2019 at 1:20 AM Kees Cook wrote: > > > > On Wed, May 15, 2019 at 04:53:15PM +0900, Masahiro Yamada wrote: > > > On Wed, May 15, 2019 at 4:40 PM Masahiro Yamada > > > wrote: > > > > > > > > [...] > > > > diff --g

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Kees Cook
On Thu, May 16, 2019 at 03:07:54AM +0900, Masahiro Yamada wrote: > On Wed, May 15, 2019 at 4:40 PM Masahiro Yamada > wrote: > > > $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin > > diff --git a/scripts/modules-check.sh b/scripts/modules-check.sh > > new file mode 100755 > > index

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Masahiro Yamada
On Wed, May 15, 2019 at 4:40 PM Masahiro Yamada wrote: > $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin > diff --git a/scripts/modules-check.sh b/scripts/modules-check.sh > new file mode 100755 > index ..944e68bd22b0 > --- /dev/null > +++ b/scripts/modules-check.sh > @

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Masahiro Yamada
Hi Kees, On Thu, May 16, 2019 at 1:20 AM Kees Cook wrote: > > On Wed, May 15, 2019 at 04:53:15PM +0900, Masahiro Yamada wrote: > > On Wed, May 15, 2019 at 4:40 PM Masahiro Yamada > > wrote: > > > > > > In the recent build test of linux-next, Stephen saw a build error > > > caused by a broken .tm

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Kees Cook
On Wed, May 15, 2019 at 04:53:15PM +0900, Masahiro Yamada wrote: > On Wed, May 15, 2019 at 4:40 PM 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 > > >

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Masahiro Yamada
On Wed, May 15, 2019 at 8:34 PM Greg KH wrote: > > On Wed, May 15, 2019 at 05:57:50PM +0900, Masahiro Yamada wrote: > > On Wed, May 15, 2019 at 5:14 PM Greg KH wrote: > > > > > > On Wed, May 15, 2019 at 10:08:12AM +0200, Arnd Bergmann wrote: > > > > On Wed, May 15, 2019 at 9:39 AM Masahiro Yamada

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Greg KH
On Wed, May 15, 2019 at 05:57:50PM +0900, Masahiro Yamada wrote: > On Wed, May 15, 2019 at 5:14 PM Greg KH wrote: > > > > On Wed, May 15, 2019 at 10:08:12AM +0200, Arnd Bergmann wrote: > > > On Wed, May 15, 2019 at 9:39 AM Masahiro Yamada > > > wrote: > > > > > > > > In the recent build test of l

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Masahiro Yamada
On Wed, May 15, 2019 at 5:14 PM Greg KH wrote: > > On Wed, May 15, 2019 at 10:08:12AM +0200, Arnd Bergmann wrote: > > On Wed, May 15, 2019 at 9:39 AM Masahiro Yamada > > wrote: > > > > > > In the recent build test of linux-next, Stephen saw a build error > > > caused by a broken .tmp_versions/*.m

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Greg KH
On Wed, May 15, 2019 at 10:08:12AM +0200, Arnd Bergmann wrote: > On Wed, May 15, 2019 at 9:39 AM 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 > > > >

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Arnd Bergmann
On Wed, May 15, 2019 at 9:39 AM 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, an

Re: [RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Masahiro Yamada
On Wed, May 15, 2019 at 4:40 PM 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, an

[RFC PATCH] kbuild: check uniqueness of basename of modules

2019-05-15 Thread Masahiro Yamada
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