lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221122051605.4hcbslwxez2trdvt@treble>
Date:   Mon, 21 Nov 2022 21:16:05 -0800
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     "Paul E. McKenney" <paulmck@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>, sfr@...b.auug.org.au,
        linux-kernel@...r.kernel.org
Subject: Re: objtool warning for next-20221118

On Mon, Nov 21, 2022 at 06:52:15AM -0800, Paul E. McKenney wrote:
> On Mon, Nov 21, 2022 at 12:31:57PM +0100, Peter Zijlstra wrote:
> > On Sun, Nov 20, 2022 at 08:07:36PM -0800, Paul E. McKenney wrote:
> > > Hello!
> > > 
> > > I have started getting this from rcutorture scenario TREE09:
> > > 
> > > vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction
> > > 
> > > Should I be worried?
> > 
> > Typically not a scary warning that.
> > 
> > > If so, please let me know what additional information you need.
> > 
> > .config and compiler version so that I might recreate and observe what
> > it's complaining about would help :-)
> 
> Fair enough!  ;-)
> 
> .config is attached, and the compiler versions are:
> 
> gcc version 8.5.0 20210514 (Red Hat 8.5.0-15) (GCC)
> gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 
> 
> From an RCU perspective, the key points about TREE09's .config is
> CONFIG_PREEMPTION=y and CONFIG_SMP=n, but running on a single-CPU qemu
> instance.

It's complaining about an unreachable instruction after a call to
arch_cpu_idle_dead().  In this case objtool detects the fact
arch_cpu_idle_dead() doesn't return due to its call to the
non-CONFIG_SMP version of play_dead().  But GCC has no way of detecting
that because the caller is in another translation unit.

As far as I can tell, that function should never return.  Though it
seems to have some dubious semantics (see xen_pv_play_dead() for
example, which *does* seem to return?).  I'm thinking it would be an
improvement to enforce that noreturn behavior across all arches and
platforms, sprinkling __noreturn and BUG() on arch_cpu_idle_dead() and
maybe some of it callees, where needed.

Peter, what do you think?  I could attempt a patch.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ