linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Clark Williams <williams@redhat.com>,
	Juri Lelli <juri.lelli@gmail.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: WARN_ON: userstacktrace on irq events
Date: Fri, 5 Apr 2019 10:12:27 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1904051000290.1802@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190403121640.70128095@gandalf.local.home>

On Wed, 3 Apr 2019, Steven Rostedt wrote:
> Juri reported this from the -rt kernel, but I can easily trigger it in
> mainline. By simply doing:
> 
>  # cd /sys/kernel/tracing
>  # echo 1 > options/userstacktrace
>  # echo 1 > events/irq/enable
> This is simply caused by the irq trace events doing a user stack trace:
> 
> ftrace_trace_userstack {
>   save_stack_trace_user {
>     __save_stack_trace_user {
>       copy_stack_frame {
>         access_ok {
> 	  WARN_ON_IN_IRQ()
> 
> BOOM! Warn on.
> 
> Can we make that access_ok() call in the copy_stack_frame not trigger
> the warning just if we are in an interrupt?

You really want to have access_ok_atomic() or such which does not have the
WARN and use that in copy_stack_frame(). That's fine here because the
actual copy is inside a pagefault disabled region.

Thanks,

	tglx

  reply	other threads:[~2019-04-05  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 16:16 WARN_ON: userstacktrace on irq events Steven Rostedt
2019-04-05  8:12 ` Thomas Gleixner [this message]
2019-04-05 13:32   ` Steven Rostedt
2019-06-21 14:12     ` Masami Hiramatsu
2019-07-22  8:32       ` [PATCH 0/1] x86/stacktrace: Fix userstacktrace access_ok() WARNING in " Eiichi Tsukata
2019-07-22  8:32         ` [PATCH 1/1] " Eiichi Tsukata
2019-07-22  8:46           ` [tip:x86/urgent] x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user() tip-bot for Eiichi Tsukata

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=alpine.DEB.2.21.1904051000290.1802@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=juri.lelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    --cc=williams@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).