public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH] lockdep: Noinstr annotate warn_bogus_irq_restore()
Date: Tue, 9 Feb 2021 16:13:22 +0000	[thread overview]
Message-ID: <20210209161322.GC71297@C02TD0UTHF1T.local> (raw)
In-Reply-To: <YCKyYg53mMp4E7YI@hirez.programming.kicks-ass.net>

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@infradead.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@infradead.org>
> > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > 
> > Whoops; sorry for missing that!
> > 
> > Acked-by: Mark Rutland <mark.rutland@arm.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@infradead.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@infradead.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Acked-by: Mark Rutland <mark.rutland@arm.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);

  reply	other threads:[~2021-02-09 16:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 12:52 linux-next: Tree for Feb 8 Stephen Rothwell
2021-02-08 19:30 ` linux-next: Tree for Feb 8 (objtool: warnings: 5) Randy Dunlap
2021-02-08 21:21   ` Josh Poimboeuf
2021-02-08 21:39     ` Randy Dunlap
2021-02-09 22:59       ` Josh Poimboeuf
2021-02-10  0:16         ` Randy Dunlap
2021-02-09  8:06     ` Peter Zijlstra
2021-02-09 23:23       ` [PATCH] ubsan: remove overflow checks Andrey Ryabinin
2021-02-10  0:19         ` Kees Cook
2021-02-10  7:50           ` Peter Zijlstra
2021-02-10 11:55           ` Andrey Rybainin
2021-02-09  8:34   ` [PATCH] lockdep: Noinstr annotate warn_bogus_irq_restore() Peter Zijlstra
2021-02-09 13:24     ` Mark Rutland
2021-02-09 16:03       ` Peter Zijlstra
2021-02-09 16:13         ` Mark Rutland [this message]
2021-02-09 18:28         ` Randy Dunlap
2021-02-09  3:33 ` linux-next: Tree for Feb 8 (Warning at arch/x86/kernel/irq.c:390) Randy Dunlap
2021-02-09 10:17   ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210209161322.GC71297@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox