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:   Tue, 9 Feb 2021 16:13:22 +0000
From:   Mark Rutland <mark.rutland@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH] lockdep: Noinstr annotate warn_bogus_irq_restore()

On Tue, Feb 09, 2021 at 05:03:46PM +0100, Peter Zijlstra wrote:
> On Tue, Feb 09, 2021 at 01:24:30PM +0000, Mark Rutland wrote:
> > On Tue, Feb 09, 2021 at 09:34:10AM +0100, Peter Zijlstra wrote:
> > > 
> > > Subject: lockdep: Noinstr annotate warn_bogus_irq_restore()
> > > From: Peter Zijlstra <peterz@...radead.org>
> > > Date: Tue Feb 9 09:30:03 CET 2021
> > > 
> > >   vmlinux.o: warning: objtool: lock_is_held_type()+0x107: call to warn_bogus_irq_restore() leaves .noinstr.text section
> > > 
> > > As per the general rule that WARNs are allowed to violate noinstr to
> > > get out, annotate it away.
> > > 
> > > Fixes: 997acaf6b4b5 ("lockdep: report broken irq restoration")
> > > Reported-by: Randy Dunlap <rdunlap@...radead.org>
> > > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > 
> > Whoops; sorry for missing that!
> > 
> > Acked-by: Mark Rutland <mark.rutland@....com>
> 
> This runs into sodding header hell on mips (and possibly others)
> 
> How's this then?

Looks fine to me, FWIW.

Mark.

> 
> ---
> Subject: lockdep: Noinstr annotate warn_bogus_irq_restore()
> From: Peter Zijlstra <peterz@...radead.org>
> Date: Tue Feb 9 09:30:03 CET 2021
> 
>   vmlinux.o: warning: objtool: lock_is_held_type()+0x107: call to warn_bogus_irq_restore() leaves .noinstr.text section
> 
> As per the general rule that WARNs are allowed to violate noinstr to
> get out, annotate it away.
> 
> Fixes: 997acaf6b4b5 ("lockdep: report broken irq restoration")
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Acked-by: Mark Rutland <mark.rutland@....com>
> ---
>  include/linux/irqflags.h       |    5 ++++-
>  kernel/locking/irqflag-debug.c |    4 +++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> --- a/kernel/locking/irqflag-debug.c
> +++ b/kernel/locking/irqflag-debug.c
> @@ -4,8 +4,10 @@
>  #include <linux/export.h>
>  #include <linux/irqflags.h>
>  
> -void warn_bogus_irq_restore(void)
> +noinstr void warn_bogus_irq_restore(void)
>  {
> +	instrumentation_begin();
>  	WARN_ONCE(1, "raw_local_irq_restore() called with IRQs enabled\n");
> +	instrumentation_end();
>  }
>  EXPORT_SYMBOL(warn_bogus_irq_restore);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ