Hello!
I am seeing a couple of objtool warnings in allmodconfig builds in
current mainline. One of them is fixed by Borislav's patch [1], but I
do not see a fix for the other one:
vmlinux.o: warning: objtool: exc_nmi+0x2b3: call to __const_udelay() leaves .noinstr.text section
Borislav's older fix [2] is in tree.
I see this with gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04) and also with
gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC).
Thoughts?
Thanx, Paul
[1] https://www.spinics.net/lists/kernel/msg4697317.html
[2] https://lore.kernel.org/lkml/[email protected]/
On Wed, Apr 26, 2023 at 04:50:49PM -0700, Paul E. McKenney wrote:
> vmlinux.o: warning: objtool: exc_nmi+0x2b3: call to __const_udelay() leaves .noinstr.text section
What does
./scripts/faddr2line vmlinux.o exc_nmi+0x2b3
say?
I guess it should point to io_check_error()'s udelay().
If so, it is noinline:
81423c37415f ("x86/timer: Don't inline __const_udelay()")
> I see this with gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04) and also with
> gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC).
I can't trigger it here with
gcc-11 (Debian 11.2.0-19) 11.2.0
Which is weird because the asm looks like it should warn.
Does it go away if you remove the noinline before __const_udelay()?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
On Thu, Apr 27, 2023 at 11:14:21AM +0200, Borislav Petkov wrote:
> On Wed, Apr 26, 2023 at 04:50:49PM -0700, Paul E. McKenney wrote:
> > vmlinux.o: warning: objtool: exc_nmi+0x2b3: call to __const_udelay() leaves .noinstr.text section
>
> What does
>
> ./scripts/faddr2line vmlinux.o exc_nmi+0x2b3
>
> say?
$ ./scripts/faddr2line vmlinux.o exc_nmi+0x2b3
exc_nmi+0x2b3/0x3c0:
exc_nmi at ??:?
Which might mean something to you, but does not look all that helpful
to me. :-/
> I guess it should point to io_check_error()'s udelay().
>
> If so, it is noinline:
>
> 81423c37415f ("x86/timer: Don't inline __const_udelay()")
I do have that commit, so it is noinline.
> > I see this with gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04) and also with
> > gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC).
>
> I can't trigger it here with
>
> gcc-11 (Debian 11.2.0-19) 11.2.0
>
> Which is weird because the asm looks like it should warn.
>
> Does it go away if you remove the noinline before __const_udelay()?
It stays.
No idea here.
Thanx, Paul
On Thu, Apr 27, 2023 at 09:55:41AM -0700, Paul E. McKenney wrote:
> On Thu, Apr 27, 2023 at 11:14:21AM +0200, Borislav Petkov wrote:
> > On Wed, Apr 26, 2023 at 04:50:49PM -0700, Paul E. McKenney wrote:
> > > vmlinux.o: warning: objtool: exc_nmi+0x2b3: call to __const_udelay() leaves .noinstr.text section
> >
> > What does
> >
> > ./scripts/faddr2line vmlinux.o exc_nmi+0x2b3
> >
> > say?
>
> $ ./scripts/faddr2line vmlinux.o exc_nmi+0x2b3
> exc_nmi+0x2b3/0x3c0:
> exc_nmi at ??:?
>
> Which might mean something to you, but does not look all that helpful
> to me. :-/
This means DWARF is missing. Can you enable one of the
CONFIG_DEBUG_INFO_DWARF* options and try that again?
And yes, we should improve the error message for faddr2line.
--
Josh