public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
       [not found]   ` <CAKwvOdmCmvHNpyjNtNU1OeSzK_E_9n9T4CPiFGD7K_JuJDOj-w@mail.gmail.com>
@ 2021-05-03 19:16     ` Arnd Bergmann
  2021-05-04  4:42       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2021-05-03 19:16 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Greg Kroah-Hartman, Andrew Morton, Linux Memory Management List,
	Sasha Levin, Alexander Shishkin, Masahiro Yamada, stable

On Mon, May 3, 2021 at 7:00 PM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
> > > >> ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
> >
> > I'm fairly sure this is unrelated to my patch, but I don't see what
> > happened here.
>
> It's unrelated to your patch. It was fixed in 5.7 by
> 7273ad2b08f8ac9563579d16a3cf528857b26f49 and a few other dependencies
> according to https://github.com/ClangBuiltLinux/linux/issues/515.
>

Ah right, the big hammer.

Greg, not sure what we want to do here. Backporting

7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when
CONFIG_MODULES=y")

to v5.4 and earlier would be an easy workaround, but it has the potential
of adding extra bloat to the kernel image since it links in all other
library objects as well.

        Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
  2021-05-03 19:16     ` [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! Arnd Bergmann
@ 2021-05-04  4:42       ` Greg Kroah-Hartman
  2021-05-04  7:41         ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-04  4:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nick Desaulniers, kernel test robot, kbuild-all,
	clang-built-linux, Andrew Morton, Linux Memory Management List,
	Sasha Levin, Alexander Shishkin, Masahiro Yamada, stable

On Mon, May 03, 2021 at 09:16:42PM +0200, Arnd Bergmann wrote:
> On Mon, May 3, 2021 at 7:00 PM 'Nick Desaulniers' via Clang Built
> Linux <clang-built-linux@googlegroups.com> wrote:
> > > > >> ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
> > >
> > > I'm fairly sure this is unrelated to my patch, but I don't see what
> > > happened here.
> >
> > It's unrelated to your patch. It was fixed in 5.7 by
> > 7273ad2b08f8ac9563579d16a3cf528857b26f49 and a few other dependencies
> > according to https://github.com/ClangBuiltLinux/linux/issues/515.
> >
> 
> Ah right, the big hammer.
> 
> Greg, not sure what we want to do here. Backporting
> 
> 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when
> CONFIG_MODULES=y")
> 
> to v5.4 and earlier would be an easy workaround, but it has the potential
> of adding extra bloat to the kernel image since it links in all other
> library objects as well.

I've lost the thread here, but what _real_ problem is happening here
that doing the above is required?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
  2021-05-04  4:42       ` Greg Kroah-Hartman
@ 2021-05-04  7:41         ` Arnd Bergmann
  2021-05-04  8:25           ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2021-05-04  7:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Nick Desaulniers, kernel test robot, kbuild-all,
	clang-built-linux, Andrew Morton, Linux Memory Management List,
	Sasha Levin, Alexander Shishkin, Masahiro Yamada, stable

On Tue, May 4, 2021 at 6:43 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Mon, May 03, 2021 at 09:16:42PM +0200, Arnd Bergmann wrote:
> > On Mon, May 3, 2021 at 7:00 PM 'Nick Desaulniers' via Clang Built
> > Linux <clang-built-linux@googlegroups.com> wrote:
> > > > > >> ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
> > > >
> > > > I'm fairly sure this is unrelated to my patch, but I don't see what
> > > > happened here.
> > >
> > > It's unrelated to your patch. It was fixed in 5.7 by
> > > 7273ad2b08f8ac9563579d16a3cf528857b26f49 and a few other dependencies
> > > according to https://github.com/ClangBuiltLinux/linux/issues/515.
> > >
> >
> > Ah right, the big hammer.
> >
> > Greg, not sure what we want to do here. Backporting
> >
> > 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when
> > CONFIG_MODULES=y")
> >
> > to v5.4 and earlier would be an easy workaround, but it has the potential
> > of adding extra bloat to the kernel image since it links in all other
> > library objects as well.
>
> I've lost the thread here, but what _real_ problem is happening here
> that doing the above is required?

Randconfig builds fail if drivers/hwtracing/stm/stm_core.ko is a loadable
modules and nothing inside vmlinux forces lib/memcat_p.o to be
linked in. A simpler workaround for v5.4 would be:

diff --git a/lib/Makefile b/lib/Makefile
index a5c5f342ade0..745d1207e9e2 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -33,7 +33,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
         flex_proportions.o ratelimit.o show_mem.o \
         is_single_threaded.o plist.o decompress.o kobject_uevent.o \
         earlycpio.o seq_buf.o siphash.o dec_and_lock.o \
-        nmi_backtrace.o nodemask.o win_minmax.o memcat_p.o \
+        nmi_backtrace.o nodemask.o win_minmax.o \
         buildid.o

 lib-$(CONFIG_PRINTK) += dump_stack.o
@@ -48,7 +48,7 @@ obj-y += bcd.o sort.o parser.o debug_locks.o random32.o \
         bsearch.o find_bit.o llist.o memweight.o kfifo.o \
         percpu-refcount.o rhashtable.o \
         once.o refcount.o usercopy.o errseq.o bucket_locks.o \
-        generic-radix-tree.o
+        generic-radix-tree.o memcat_p.o
 obj-$(CONFIG_STRING_SELFTEST) += test_string.o
 obj-y += string_helpers.o
 obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o

which is the same as what 7273ad2b08f8 does, but only for this one file
instead of all of lib/*.o.

       Arnd

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
  2021-05-04  7:41         ` Arnd Bergmann
@ 2021-05-04  8:25           ` Greg Kroah-Hartman
  2021-05-04 10:46             ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-04  8:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nick Desaulniers, kernel test robot, kbuild-all,
	clang-built-linux, Andrew Morton, Linux Memory Management List,
	Sasha Levin, Alexander Shishkin, Masahiro Yamada, stable

On Tue, May 04, 2021 at 09:41:14AM +0200, Arnd Bergmann wrote:
> On Tue, May 4, 2021 at 6:43 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Mon, May 03, 2021 at 09:16:42PM +0200, Arnd Bergmann wrote:
> > > On Mon, May 3, 2021 at 7:00 PM 'Nick Desaulniers' via Clang Built
> > > Linux <clang-built-linux@googlegroups.com> wrote:
> > > > > > >> ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
> > > > >
> > > > > I'm fairly sure this is unrelated to my patch, but I don't see what
> > > > > happened here.
> > > >
> > > > It's unrelated to your patch. It was fixed in 5.7 by
> > > > 7273ad2b08f8ac9563579d16a3cf528857b26f49 and a few other dependencies
> > > > according to https://github.com/ClangBuiltLinux/linux/issues/515.
> > > >
> > >
> > > Ah right, the big hammer.
> > >
> > > Greg, not sure what we want to do here. Backporting
> > >
> > > 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when
> > > CONFIG_MODULES=y")
> > >
> > > to v5.4 and earlier would be an easy workaround, but it has the potential
> > > of adding extra bloat to the kernel image since it links in all other
> > > library objects as well.
> >
> > I've lost the thread here, but what _real_ problem is happening here
> > that doing the above is required?
> 
> Randconfig builds fail if drivers/hwtracing/stm/stm_core.ko is a loadable
> modules and nothing inside vmlinux forces lib/memcat_p.o to be
> linked in. A simpler workaround for v5.4 would be:
> 
> diff --git a/lib/Makefile b/lib/Makefile
> index a5c5f342ade0..745d1207e9e2 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -33,7 +33,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
>          flex_proportions.o ratelimit.o show_mem.o \
>          is_single_threaded.o plist.o decompress.o kobject_uevent.o \
>          earlycpio.o seq_buf.o siphash.o dec_and_lock.o \
> -        nmi_backtrace.o nodemask.o win_minmax.o memcat_p.o \
> +        nmi_backtrace.o nodemask.o win_minmax.o \
>          buildid.o
> 
>  lib-$(CONFIG_PRINTK) += dump_stack.o
> @@ -48,7 +48,7 @@ obj-y += bcd.o sort.o parser.o debug_locks.o random32.o \
>          bsearch.o find_bit.o llist.o memweight.o kfifo.o \
>          percpu-refcount.o rhashtable.o \
>          once.o refcount.o usercopy.o errseq.o bucket_locks.o \
> -        generic-radix-tree.o
> +        generic-radix-tree.o memcat_p.o
>  obj-$(CONFIG_STRING_SELFTEST) += test_string.o
>  obj-y += string_helpers.o
>  obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
> 
> which is the same as what 7273ad2b08f8 does, but only for this one file
> instead of all of lib/*.o.

I think a "one off" change would be best here.  Can you submit it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
  2021-05-04  8:25           ` Greg Kroah-Hartman
@ 2021-05-04 10:46             ` Arnd Bergmann
  2021-05-04 14:16               ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2021-05-04 10:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Nick Desaulniers, kernel test robot, kbuild-all,
	clang-built-linux, Andrew Morton, Linux Memory Management List,
	Sasha Levin, Alexander Shishkin, Masahiro Yamada, stable

On Tue, May 4, 2021 at 10:26 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:

> On Tue, May 04, 2021 at 09:41:14AM +0200, Arnd Bergmann wrote:
> > which is the same as what 7273ad2b08f8 does, but only for this one file
> > instead of all of lib/*.o.
>
> I think a "one off" change would be best here.  Can you submit it?

Sent https://lore.kernel.org/lkml/20210504104441.1317138-1-arnd@kernel.org/T/

      Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
  2021-05-04 10:46             ` Arnd Bergmann
@ 2021-05-04 14:16               ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-04 14:16 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nick Desaulniers, kernel test robot, kbuild-all,
	clang-built-linux, Andrew Morton, Linux Memory Management List,
	Sasha Levin, Alexander Shishkin, Masahiro Yamada, stable

On Tue, May 04, 2021 at 12:46:05PM +0200, Arnd Bergmann wrote:
> On Tue, May 4, 2021 at 10:26 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> 
> > On Tue, May 04, 2021 at 09:41:14AM +0200, Arnd Bergmann wrote:
> > > which is the same as what 7273ad2b08f8 does, but only for this one file
> > > instead of all of lib/*.o.
> >
> > I think a "one off" change would be best here.  Can you submit it?
> 
> Sent https://lore.kernel.org/lkml/20210504104441.1317138-1-arnd@kernel.org/T/

Thanks, now queued up.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-04 14:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202105030311.xWwkyV9z-lkp@intel.com>
     [not found] ` <CAK8P3a0ZdZY94KVwF-C_t+7rx=iHC60ty52AQAmc1VDZwsn9Rw@mail.gmail.com>
     [not found]   ` <CAKwvOdmCmvHNpyjNtNU1OeSzK_E_9n9T4CPiFGD7K_JuJDOj-w@mail.gmail.com>
2021-05-03 19:16     ` [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! Arnd Bergmann
2021-05-04  4:42       ` Greg Kroah-Hartman
2021-05-04  7:41         ` Arnd Bergmann
2021-05-04  8:25           ` Greg Kroah-Hartman
2021-05-04 10:46             ` Arnd Bergmann
2021-05-04 14:16               ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox