* Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers
[not found] ` <20191003102915.28301-4-yamada.masahiro@socionext.com>
@ 2019-10-31 16:51 ` Jeff Moyer
2019-11-01 1:13 ` Masahiro Yamada
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Moyer @ 2019-10-31 16:51 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, Sam Ravnborg, Michal Marek, linux-kernel, linux-nvdimm
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> Now that there is no overwrap between symbols from ELF files and
> ones from Module.symvers.
>
> So, the 'exported twice' warning should be reported irrespective
> of where the symbol in question came from. Only the exceptional case
> is when __crc_<sym> symbol appears before __ksymtab_<sym>. This
> typically occurs for EXPORT_SYMBOL in .S files.
Hi, Masahiro,
After apply this patch, I get the following modpost warnings when doing:
$ make M=tools/tesing/nvdimm
...
Building modules, stage 2.
MODPOST 12 modules
WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_lock' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_unlock' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
WARNING: tools/testing/nvdimm/libnvdimm: 'is_nvdimm_bus_locked' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
WARNING: tools/testing/nvdimm/libnvdimm: 'to_nvdimm_bus_dev' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
...
There are a lot of these warnings. :) If I revert this patch, no
complaints.
Cheers,
Jeff
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> scripts/mod/modpost.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 5234555cf550..6ca38d10efc5 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -2457,7 +2457,6 @@ static void read_dump(const char *fname, unsigned int kernel)
> s = sym_add_exported(symname, namespace, mod,
> export_no(export));
> s->kernel = kernel;
> - s->preloaded = 1;
> s->is_static = 0;
> sym_update_crc(symname, mod, crc, export_no(export));
> }
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers
2019-10-31 16:51 ` [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers Jeff Moyer
@ 2019-11-01 1:13 ` Masahiro Yamada
2019-11-01 18:52 ` Jeff Moyer
0 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2019-11-01 1:13 UTC (permalink / raw)
To: Jeff Moyer
Cc: Linux Kbuild mailing list, Sam Ravnborg, Michal Marek,
Linux Kernel Mailing List, linux-nvdimm
On Fri, Nov 1, 2019 at 1:51 AM Jeff Moyer <jmoyer@redhat.com> wrote:
>
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>
> > Now that there is no overwrap between symbols from ELF files and
> > ones from Module.symvers.
> >
> > So, the 'exported twice' warning should be reported irrespective
> > of where the symbol in question came from. Only the exceptional case
> > is when __crc_<sym> symbol appears before __ksymtab_<sym>. This
> > typically occurs for EXPORT_SYMBOL in .S files.
>
> Hi, Masahiro,
>
> After apply this patch, I get the following modpost warnings when doing:
>
> $ make M=tools/tesing/nvdimm
> ...
> Building modules, stage 2.
> MODPOST 12 modules
> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_lock' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_unlock' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> WARNING: tools/testing/nvdimm/libnvdimm: 'is_nvdimm_bus_locked' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nvdimm_bus_dev' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> ...
>
> There are a lot of these warnings. :)
These warnings are correct since
drivers/nvdimm/Makefile and
tools/testing/nvdimm/Kbuild
compile the same files.
> If I revert this patch, no
> complaints.
>
> Cheers,
> Jeff
>
>
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
> > scripts/mod/modpost.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> > index 5234555cf550..6ca38d10efc5 100644
> > --- a/scripts/mod/modpost.c
> > +++ b/scripts/mod/modpost.c
> > @@ -2457,7 +2457,6 @@ static void read_dump(const char *fname, unsigned int kernel)
> > s = sym_add_exported(symname, namespace, mod,
> > export_no(export));
> > s->kernel = kernel;
> > - s->preloaded = 1;
> > s->is_static = 0;
> > sym_update_crc(symname, mod, crc, export_no(export));
> > }
>
--
Best Regards
Masahiro Yamada
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers
2019-11-01 1:13 ` Masahiro Yamada
@ 2019-11-01 18:52 ` Jeff Moyer
2019-11-04 3:11 ` Masahiro Yamada
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Moyer @ 2019-11-01 18:52 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linux Kbuild mailing list, Sam Ravnborg, Michal Marek,
Linux Kernel Mailing List, linux-nvdimm
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> On Fri, Nov 1, 2019 at 1:51 AM Jeff Moyer <jmoyer@redhat.com> wrote:
>>
>> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>>
>> > Now that there is no overwrap between symbols from ELF files and
>> > ones from Module.symvers.
>> >
>> > So, the 'exported twice' warning should be reported irrespective
>> > of where the symbol in question came from. Only the exceptional case
>> > is when __crc_<sym> symbol appears before __ksymtab_<sym>. This
>> > typically occurs for EXPORT_SYMBOL in .S files.
>>
>> Hi, Masahiro,
>>
>> After apply this patch, I get the following modpost warnings when doing:
>>
>> $ make M=tools/tesing/nvdimm
>> ...
>> Building modules, stage 2.
>> MODPOST 12 modules
>> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_lock' exported
>> twice. Previous export was in drivers/nvdimm/libnvdimm.ko
>> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_unlock'
>> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
>> WARNING: tools/testing/nvdimm/libnvdimm: 'is_nvdimm_bus_locked'
>> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
>> WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap'
>> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
>> WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
>> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
>> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nvdimm_bus_dev'
>> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
>> ...
>>
>> There are a lot of these warnings. :)
>
> These warnings are correct since
> drivers/nvdimm/Makefile and
> tools/testing/nvdimm/Kbuild
> compile the same files.
Yeah, but that's by design. Is there a way to silence these warnings?
-Jeff
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers
2019-11-01 18:52 ` Jeff Moyer
@ 2019-11-04 3:11 ` Masahiro Yamada
2019-11-04 6:43 ` Dan Williams
0 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2019-11-04 3:11 UTC (permalink / raw)
To: Jeff Moyer
Cc: Linux Kbuild mailing list, Sam Ravnborg, Michal Marek,
Linux Kernel Mailing List, linux-nvdimm
On Sat, Nov 2, 2019 at 3:52 AM Jeff Moyer <jmoyer@redhat.com> wrote:
>
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>
> > On Fri, Nov 1, 2019 at 1:51 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> >>
> >> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> >>
> >> > Now that there is no overwrap between symbols from ELF files and
> >> > ones from Module.symvers.
> >> >
> >> > So, the 'exported twice' warning should be reported irrespective
> >> > of where the symbol in question came from. Only the exceptional case
> >> > is when __crc_<sym> symbol appears before __ksymtab_<sym>. This
> >> > typically occurs for EXPORT_SYMBOL in .S files.
> >>
> >> Hi, Masahiro,
> >>
> >> After apply this patch, I get the following modpost warnings when doing:
> >>
> >> $ make M=tools/tesing/nvdimm
> >> ...
> >> Building modules, stage 2.
> >> MODPOST 12 modules
> >> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_lock' exported
> >> twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> >> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_unlock'
> >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> >> WARNING: tools/testing/nvdimm/libnvdimm: 'is_nvdimm_bus_locked'
> >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> >> WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap'
> >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> >> WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> >> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> >> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nvdimm_bus_dev'
> >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> >> ...
> >>
> >> There are a lot of these warnings. :)
> >
> > These warnings are correct since
> > drivers/nvdimm/Makefile and
> > tools/testing/nvdimm/Kbuild
> > compile the same files.
>
> Yeah, but that's by design. Is there a way to silence these warnings?
>
> -Jeff
>
"rm -f Module.symvers; make M=tools/testing/nvdimm" ?
I'd like the _design_ fixed though.
--
Best Regards
Masahiro Yamada
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers
2019-11-04 3:11 ` Masahiro Yamada
@ 2019-11-04 6:43 ` Dan Williams
2019-11-04 18:47 ` Dan Williams
0 siblings, 1 reply; 6+ messages in thread
From: Dan Williams @ 2019-11-04 6:43 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linux Kbuild mailing list, Sam Ravnborg, Michal Marek,
Linux Kernel Mailing List, linux-nvdimm
On Sun, Nov 3, 2019 at 7:12 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> On Sat, Nov 2, 2019 at 3:52 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> >
> > Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> >
> > > On Fri, Nov 1, 2019 at 1:51 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> > >>
> > >> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> > >>
> > >> > Now that there is no overwrap between symbols from ELF files and
> > >> > ones from Module.symvers.
> > >> >
> > >> > So, the 'exported twice' warning should be reported irrespective
> > >> > of where the symbol in question came from. Only the exceptional case
> > >> > is when __crc_<sym> symbol appears before __ksymtab_<sym>. This
> > >> > typically occurs for EXPORT_SYMBOL in .S files.
> > >>
> > >> Hi, Masahiro,
> > >>
> > >> After apply this patch, I get the following modpost warnings when doing:
> > >>
> > >> $ make M=tools/tesing/nvdimm
> > >> ...
> > >> Building modules, stage 2.
> > >> MODPOST 12 modules
> > >> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_lock' exported
> > >> twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > >> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_unlock'
> > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > >> WARNING: tools/testing/nvdimm/libnvdimm: 'is_nvdimm_bus_locked'
> > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > >> WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap'
> > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > >> WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > >> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > >> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nvdimm_bus_dev'
> > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > >> ...
> > >>
> > >> There are a lot of these warnings. :)
> > >
> > > These warnings are correct since
> > > drivers/nvdimm/Makefile and
> > > tools/testing/nvdimm/Kbuild
> > > compile the same files.
> >
> > Yeah, but that's by design. Is there a way to silence these warnings?
> >
> > -Jeff
> >
>
> "rm -f Module.symvers; make M=tools/testing/nvdimm" ?
>
> I'd like the _design_ fixed though.
This design is deliberate. The goal is to re-build the typical nvdimm
modules, but link them against mocked version of core kernel symbols.
This enables the nvdimm unit tests which have been there for years and
pre-date Kunit. That said, deleting Module.symvers seems a simple
enough workaround.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers
2019-11-04 6:43 ` Dan Williams
@ 2019-11-04 18:47 ` Dan Williams
0 siblings, 0 replies; 6+ messages in thread
From: Dan Williams @ 2019-11-04 18:47 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linux Kbuild mailing list, Sam Ravnborg, Michal Marek,
Linux Kernel Mailing List, linux-nvdimm
On Sun, Nov 3, 2019 at 10:43 PM Dan Williams <dan.j.williams@intel.com> wrote:
>
> On Sun, Nov 3, 2019 at 7:12 PM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> >
> > On Sat, Nov 2, 2019 at 3:52 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> > >
> > > Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> > >
> > > > On Fri, Nov 1, 2019 at 1:51 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> > > >>
> > > >> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> > > >>
> > > >> > Now that there is no overwrap between symbols from ELF files and
> > > >> > ones from Module.symvers.
> > > >> >
> > > >> > So, the 'exported twice' warning should be reported irrespective
> > > >> > of where the symbol in question came from. Only the exceptional case
> > > >> > is when __crc_<sym> symbol appears before __ksymtab_<sym>. This
> > > >> > typically occurs for EXPORT_SYMBOL in .S files.
> > > >>
> > > >> Hi, Masahiro,
> > > >>
> > > >> After apply this patch, I get the following modpost warnings when doing:
> > > >>
> > > >> $ make M=tools/tesing/nvdimm
> > > >> ...
> > > >> Building modules, stage 2.
> > > >> MODPOST 12 modules
> > > >> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_lock' exported
> > > >> twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > > >> WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_unlock'
> > > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > > >> WARNING: tools/testing/nvdimm/libnvdimm: 'is_nvdimm_bus_locked'
> > > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > > >> WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap'
> > > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > > >> WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > > >> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > > >> WARNING: tools/testing/nvdimm/libnvdimm: 'to_nvdimm_bus_dev'
> > > >> exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko
> > > >> ...
> > > >>
> > > >> There are a lot of these warnings. :)
> > > >
> > > > These warnings are correct since
> > > > drivers/nvdimm/Makefile and
> > > > tools/testing/nvdimm/Kbuild
> > > > compile the same files.
> > >
> > > Yeah, but that's by design. Is there a way to silence these warnings?
> > >
> > > -Jeff
> > >
> >
> > "rm -f Module.symvers; make M=tools/testing/nvdimm" ?
> >
> > I'd like the _design_ fixed though.
>
> This design is deliberate. The goal is to re-build the typical nvdimm
> modules, but link them against mocked version of core kernel symbols.
> This enables the nvdimm unit tests which have been there for years and
> pre-date Kunit. That said, deleting Module.symvers seems a simple
> enough workaround.
This workaround triggers:
WARNING: Symbol version dump ./Module.symvers
is missing; modules will have no dependencies and modversions.
Which is a regression from the previous working state.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-11-04 18:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20191003102915.28301-1-yamada.masahiro@socionext.com>
[not found] ` <20191003102915.28301-4-yamada.masahiro@socionext.com>
2019-10-31 16:51 ` [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers Jeff Moyer
2019-11-01 1:13 ` Masahiro Yamada
2019-11-01 18:52 ` Jeff Moyer
2019-11-04 3:11 ` Masahiro Yamada
2019-11-04 6:43 ` Dan Williams
2019-11-04 18:47 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).