linux-toolchains.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] -next objtool build failure (bisected)
@ 2024-10-15 18:10 Paul E. McKenney
  2024-10-15 18:33 ` Dmitry Torokhov
  2024-10-15 18:45 ` Josh Poimboeuf
  0 siblings, 2 replies; 5+ messages in thread
From: Paul E. McKenney @ 2024-10-15 18:10 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: bentiss, sfr, linux-kernel, linux-next, linux-toolchains,
	jpoimboe

Hello!

The next-20241011 release gets me build errors like the following:

	vmlinux.o: warning: objtool: fetch_item() falls through to next function

Bisection leads me here:

	61595012f280 ("HID: simplify code in fetch_item()")

This diff looks inoffensive to me, but I get this error on this commit
and not on its predecessor.

This build failure happens on quite a few different kernel configurations.
I bisected using this particular reproducer:

tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --buildonly --configs SRCU-T

Thoughts?

							Thanx, Paul

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

* Re: [BUG] -next objtool build failure (bisected)
  2024-10-15 18:10 [BUG] -next objtool build failure (bisected) Paul E. McKenney
@ 2024-10-15 18:33 ` Dmitry Torokhov
  2024-10-15 18:46   ` Paul E. McKenney
  2024-10-15 18:45 ` Josh Poimboeuf
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2024-10-15 18:33 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: bentiss, sfr, linux-kernel, linux-next, linux-toolchains,
	jpoimboe

Hi Paul,

On Tue, Oct 15, 2024 at 11:10:11AM -0700, Paul E. McKenney wrote:
> Hello!
> 
> The next-20241011 release gets me build errors like the following:
> 
> 	vmlinux.o: warning: objtool: fetch_item() falls through to next function
> 
> Bisection leads me here:
> 
> 	61595012f280 ("HID: simplify code in fetch_item()")
> 
> This diff looks inoffensive to me, but I get this error on this commit
> and not on its predecessor.
> 
> This build failure happens on quite a few different kernel configurations.
> I bisected using this particular reproducer:
> 
> tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --buildonly --configs SRCU-T
> 
> Thoughts?

I just added you to another thread where Nathan proposed a couple of
solutions:

https://lore.kernel.org/r/20241010222451.GA3571761@thelio-3990X

Thanks.

-- 
Dmitry

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

* Re: [BUG] -next objtool build failure (bisected)
  2024-10-15 18:10 [BUG] -next objtool build failure (bisected) Paul E. McKenney
  2024-10-15 18:33 ` Dmitry Torokhov
@ 2024-10-15 18:45 ` Josh Poimboeuf
  2024-10-15 18:57   ` Paul E. McKenney
  1 sibling, 1 reply; 5+ messages in thread
From: Josh Poimboeuf @ 2024-10-15 18:45 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: dmitry.torokhov, bentiss, sfr, linux-kernel, linux-next,
	linux-toolchains

On Tue, Oct 15, 2024 at 11:10:11AM -0700, Paul E. McKenney wrote:
> Hello!
> 
> The next-20241011 release gets me build errors like the following:
> 
> 	vmlinux.o: warning: objtool: fetch_item() falls through to next function
> 
> Bisection leads me here:
> 
> 	61595012f280 ("HID: simplify code in fetch_item()")
> 
> This diff looks inoffensive to me, but I get this error on this commit
> and not on its predecessor.
> 
> This build failure happens on quite a few different kernel configurations.
> I bisected using this particular reproducer:
> 
> tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --buildonly --configs SRCU-T

The problem is likely this:

+	default:
+		unreachable();

The unreachable() annotation by itself produces undefined behavior, as
it will just fall off the edge of the function if the default case is
ever executed.

Better to do

	default:
		BUG();

which makes the behavior defined.

-- 
Josh

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

* Re: [BUG] -next objtool build failure (bisected)
  2024-10-15 18:33 ` Dmitry Torokhov
@ 2024-10-15 18:46   ` Paul E. McKenney
  0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2024-10-15 18:46 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: bentiss, sfr, linux-kernel, linux-next, linux-toolchains,
	jpoimboe

On Tue, Oct 15, 2024 at 11:33:11AM -0700, Dmitry Torokhov wrote:
> Hi Paul,
> 
> On Tue, Oct 15, 2024 at 11:10:11AM -0700, Paul E. McKenney wrote:
> > Hello!
> > 
> > The next-20241011 release gets me build errors like the following:
> > 
> > 	vmlinux.o: warning: objtool: fetch_item() falls through to next function
> > 
> > Bisection leads me here:
> > 
> > 	61595012f280 ("HID: simplify code in fetch_item()")
> > 
> > This diff looks inoffensive to me, but I get this error on this commit
> > and not on its predecessor.
> > 
> > This build failure happens on quite a few different kernel configurations.
> > I bisected using this particular reproducer:
> > 
> > tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --buildonly --configs SRCU-T
> > 
> > Thoughts?
> 
> I just added you to another thread where Nathan proposed a couple of
> solutions:
> 
> https://lore.kernel.org/r/20241010222451.GA3571761@thelio-3990X

Thank you, Dmitry!  Glad that it is not just me?  ;-)

							Thanx, Paul

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

* Re: [BUG] -next objtool build failure (bisected)
  2024-10-15 18:45 ` Josh Poimboeuf
@ 2024-10-15 18:57   ` Paul E. McKenney
  0 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2024-10-15 18:57 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: dmitry.torokhov, bentiss, sfr, linux-kernel, linux-next,
	linux-toolchains

On Tue, Oct 15, 2024 at 01:45:07PM -0500, Josh Poimboeuf wrote:
> On Tue, Oct 15, 2024 at 11:10:11AM -0700, Paul E. McKenney wrote:
> > Hello!
> > 
> > The next-20241011 release gets me build errors like the following:
> > 
> > 	vmlinux.o: warning: objtool: fetch_item() falls through to next function
> > 
> > Bisection leads me here:
> > 
> > 	61595012f280 ("HID: simplify code in fetch_item()")
> > 
> > This diff looks inoffensive to me, but I get this error on this commit
> > and not on its predecessor.
> > 
> > This build failure happens on quite a few different kernel configurations.
> > I bisected using this particular reproducer:
> > 
> > tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --buildonly --configs SRCU-T
> 
> The problem is likely this:
> 
> +	default:
> +		unreachable();
> 
> The unreachable() annotation by itself produces undefined behavior, as
> it will just fall off the edge of the function if the default case is
> ever executed.
> 
> Better to do
> 
> 	default:
> 		BUG();
> 
> which makes the behavior defined.

And this fixes things for me, thank you!

							Thanx, Paul

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

end of thread, other threads:[~2024-10-15 18:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15 18:10 [BUG] -next objtool build failure (bisected) Paul E. McKenney
2024-10-15 18:33 ` Dmitry Torokhov
2024-10-15 18:46   ` Paul E. McKenney
2024-10-15 18:45 ` Josh Poimboeuf
2024-10-15 18:57   ` Paul E. McKenney

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