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]
Date:   Wed, 23 Nov 2022 11:12:42 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Josh Poimboeuf <jpoimboe@...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 Wed, Nov 23, 2022 at 10:19:41AM -0800, Josh Poimboeuf wrote:
> On Wed, Nov 23, 2022 at 09:49:51AM -0800, Paul E. McKenney wrote:
> > > > > Perhaps the best way would be to stick a REACHABLE annotation in
> > > > > arch_cpu_idle_dead() or something?
> > > > 
> > > > When I apply this on -next, I still get the objtool complaint.
> > > > Is there something else I should also be doing?
> > > 
> > > Silly GCC is folding the inline asm.  This works (but still doesn't seem
> > > like the right approach):
> > > 
> > > diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> > > index 26e8f57c75ad..128e7d78fedf 100644
> > > --- a/arch/x86/kernel/process.c
> > > +++ b/arch/x86/kernel/process.c
> > > @@ -702,7 +702,7 @@ static void (*x86_idle)(void);
> > >  #ifndef CONFIG_SMP
> > >  static inline void play_dead(void)
> > >  {
> > > -	BUG();
> > > +	_BUG_FLAGS(ASM_UD2, 0, ASM_REACHABLE);
> > >  }
> > >  #endif
> > 
> > I tried this, and still get:
> > 
> > vmlinux.o: warning: objtool: do_idle+0x156: unreachable instruction
> > 
> > Maybe my gcc is haunted?
> 
> Weird, it worked for me.  I have
> 
>   gcc version 12.2.1 20220819 (Red Hat 12.2.1-2) (GCC)

Me, I have these, so quite a bit older:

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)

> and I can't really fathom why that wouldn't work.  Maybe it's a
> different issue?  The "unreachable instruction" warning is limited to
> one, so when a first warning gets fixed, a second warning might suddenly
> become visible.
> 
> Can you attach arch/x86/kernel/process.o?

Attached!

							Thanx, Paul

Download attachment "process.o" of type "application/x-object" (49336 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ