linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp
@ 2019-12-09 20:17 kbuild test robot
  2019-12-13 11:16 ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2019-12-09 20:17 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e42617b825f8073569da76dc4510bfa019b1c35a
commit: 30544ed5de431fe25d3793e4dd5a058d877c4d77 lib/bitmap: introduce bitmap_replace() helper
date:   5 days ago
config: xtensa-randconfig-a001-20191209 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 30544ed5de431fe25d3793e4dd5a058d877c4d77
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp
   The function bitmap_copy_clear_tail() references
   the variable __initconst clump_exp.
   This is often because bitmap_copy_clear_tail lacks a __initconst
   annotation or the annotation of clump_exp is wrong.

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24999 bytes --]

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

* Re: WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp
  2019-12-09 20:17 WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp kbuild test robot
@ 2019-12-13 11:16 ` Andy Shevchenko
  2019-12-13 21:08   ` Max Filippov
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2019-12-13 11:16 UTC (permalink / raw)
  To: kbuild test robot, Max Filippov
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

On Tue, Dec 10, 2019 at 04:17:03AM +0800, kbuild test robot wrote:

+Cc: Max for xtensa matters, perhaps he has an idea.

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   e42617b825f8073569da76dc4510bfa019b1c35a
> commit: 30544ed5de431fe25d3793e4dd5a058d877c4d77 lib/bitmap: introduce bitmap_replace() helper
> date:   5 days ago
> config: xtensa-randconfig-a001-20191209 (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 7.5.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 30544ed5de431fe25d3793e4dd5a058d877c4d77
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.5.0 make.cross ARCH=xtensa 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):

I'm not sure I got this (esp. relation to my patch).
The mentioned code definitely compiled for 32-bit (since only then mentioned
bitmap API is in use). I have tried to reproduce on i386 compilation (gcc 9.x),
but can't.

> >> WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp
>    The function bitmap_copy_clear_tail() references
>    the variable __initconst clump_exp.
>    This is often because bitmap_copy_clear_tail lacks a __initconst
>    annotation or the annotation of clump_exp is wrong.
> 
> ---
> 0-DAY kernel test infrastructure                 Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation



-- 
With Best Regards,
Andy Shevchenko



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

* Re: WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp
  2019-12-13 11:16 ` Andy Shevchenko
@ 2019-12-13 21:08   ` Max Filippov
  2019-12-13 21:19     ` Andy Shevchenko
  2019-12-15  3:17     ` Max Filippov
  0 siblings, 2 replies; 5+ messages in thread
From: Max Filippov @ 2019-12-13 21:08 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild test robot, kbuild-all, LKML, Andrew Morton,
	Linux Memory Management List

Hi Andy,

On Fri, Dec 13, 2019 at 3:16 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Tue, Dec 10, 2019 at 04:17:03AM +0800, kbuild test robot wrote:
>
> +Cc: Max for xtensa matters, perhaps he has an idea.
>
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   e42617b825f8073569da76dc4510bfa019b1c35a
> > commit: 30544ed5de431fe25d3793e4dd5a058d877c4d77 lib/bitmap: introduce bitmap_replace() helper
> > date:   5 days ago
> > config: xtensa-randconfig-a001-20191209 (attached as .config)
> > compiler: xtensa-linux-gcc (GCC) 7.5.0
> > reproduce:
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         git checkout 30544ed5de431fe25d3793e4dd5a058d877c4d77
> >         # save the attached .config to linux build tree
> >         GCC_VERSION=7.5.0 make.cross ARCH=xtensa
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
>
> I'm not sure I got this (esp. relation to my patch).
> The mentioned code definitely compiled for 32-bit (since only then mentioned
> bitmap API is in use). I have tried to reproduce on i386 compilation (gcc 9.x),
> but can't.

I was able to reproduce it on xtensa with gcc-9.
The issue comes from the test "test_replace", specifically
from the following call:
  bitmap_replace(bmap, &exp2[0], &exp2[1], exp2_to_exp3_mask, nbits);

An invariable part of the call sequence used here is instantiated in
the section .text.unlikely with a reference to exp2_to_exp3_mask built
into it and it's called from the test_replace. It looks like a compiler bug
to me, I'd expect this code to be emitted to the .init.text, i.e the same
section where the function it was hoisted from resides.
And why "unlikely"? This code is definitely executed.

I'll file a bug against gcc.

-- 
Thanks.
-- Max

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

* Re: WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp
  2019-12-13 21:08   ` Max Filippov
@ 2019-12-13 21:19     ` Andy Shevchenko
  2019-12-15  3:17     ` Max Filippov
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2019-12-13 21:19 UTC (permalink / raw)
  To: Max Filippov
  Cc: kbuild test robot, kbuild-all, LKML, Andrew Morton,
	Linux Memory Management List

On Fri, Dec 13, 2019 at 01:08:08PM -0800, Max Filippov wrote:
> On Fri, Dec 13, 2019 at 3:16 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Dec 10, 2019 at 04:17:03AM +0800, kbuild test robot wrote:
> >
> > +Cc: Max for xtensa matters, perhaps he has an idea.
> >
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head:   e42617b825f8073569da76dc4510bfa019b1c35a
> > > commit: 30544ed5de431fe25d3793e4dd5a058d877c4d77 lib/bitmap: introduce bitmap_replace() helper
> > > date:   5 days ago
> > > config: xtensa-randconfig-a001-20191209 (attached as .config)
> > > compiler: xtensa-linux-gcc (GCC) 7.5.0
> > > reproduce:
> > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >         chmod +x ~/bin/make.cross
> > >         git checkout 30544ed5de431fe25d3793e4dd5a058d877c4d77
> > >         # save the attached .config to linux build tree
> > >         GCC_VERSION=7.5.0 make.cross ARCH=xtensa
> > >
> > > If you fix the issue, kindly add following tag
> > > Reported-by: kbuild test robot <lkp@intel.com>
> > >
> > > All warnings (new ones prefixed by >>):
> >
> > I'm not sure I got this (esp. relation to my patch).
> > The mentioned code definitely compiled for 32-bit (since only then mentioned
> > bitmap API is in use). I have tried to reproduce on i386 compilation (gcc 9.x),
> > but can't.
> 
> I was able to reproduce it on xtensa with gcc-9.
> The issue comes from the test "test_replace", specifically
> from the following call:
>   bitmap_replace(bmap, &exp2[0], &exp2[1], exp2_to_exp3_mask, nbits);
> 
> An invariable part of the call sequence used here is instantiated in
> the section .text.unlikely with a reference to exp2_to_exp3_mask built
> into it and it's called from the test_replace. It looks like a compiler bug
> to me, I'd expect this code to be emitted to the .init.text, i.e the same
> section where the function it was hoisted from resides.
> And why "unlikely"? This code is definitely executed.
> 
> I'll file a bug against gcc.

Thanks for an analysis and quick response!

-- 
With Best Regards,
Andy Shevchenko



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

* Re: WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp
  2019-12-13 21:08   ` Max Filippov
  2019-12-13 21:19     ` Andy Shevchenko
@ 2019-12-15  3:17     ` Max Filippov
  1 sibling, 0 replies; 5+ messages in thread
From: Max Filippov @ 2019-12-15  3:17 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild test robot, kbuild-all, LKML, Andrew Morton,
	Linux Memory Management List

On Fri, Dec 13, 2019 at 1:08 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
> I'll file a bug against gcc.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92938

-- 
Thanks.
-- Max

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

end of thread, other threads:[~2019-12-15  3:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 20:17 WARNING: lib/test_bitmap.o(.text.unlikely+0x5c): Section mismatch in reference from the function bitmap_copy_clear_tail() to the variable .init.rodata:clump_exp kbuild test robot
2019-12-13 11:16 ` Andy Shevchenko
2019-12-13 21:08   ` Max Filippov
2019-12-13 21:19     ` Andy Shevchenko
2019-12-15  3:17     ` Max Filippov

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).