All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Dave Jones <davej@redhat.com>
Cc: paulmck@linux.vnet.ibm.com, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: suspicious RCU usage (perf)
Date: Mon, 26 Aug 2013 14:18:14 -0400	[thread overview]
Message-ID: <20130826141814.54dcaa89@gandalf.local.home> (raw)
In-Reply-To: <20130826175012.GA25202@redhat.com>

On Mon, 26 Aug 2013 13:50:12 -0400
Dave Jones <davej@redhat.com> wrote:
> 
> This was triggered as a regular user fwiw.
> I had not been running perf, or any other tracing. It was just left
> fuzzing over the weekend with no interaction at all.

So you are telling me that ftrace was enabled by a regular user? If so,
that's a huge issue.

> [260431.875883]  [<ffffffff816f9c6f>] dump_stack+0x54/0x74
> [260431.876869]  [<ffffffff810be6a7>] lockdep_rcu_suspicious+0xe7/0x120
> [260431.877852]  [<ffffffff81146ef4>] __perf_event_overflow+0x2a4/0x320
> [260431.878834]  [<ffffffff81146d50>] ? __perf_event_overflow+0x100/0x320
> [260431.879811]  [<ffffffff81146e0c>] ? __perf_event_overflow+0x1bc/0x320
> [260431.880784]  [<ffffffff8170ce00>] ? ftrace_call+0x5/0x2f
> [260431.881758]  [<ffffffff81147101>] perf_swevent_overflow+0x51/0xe0
> [260431.882728]  [<ffffffff811471ef>] perf_swevent_event+0x5f/0x90
> [260431.883685]  [<ffffffff81147329>] perf_tp_event+0x109/0x4f0
> [260431.884637]  [<ffffffff81147542>] ? perf_tp_event+0x322/0x4f0
> [260431.885586]  [<ffffffff811079fb>] ? rcu_eqs_enter_common+0x5b/0x420
> [260431.886539]  [<ffffffff8107a320>] ? task_work_run+0xe0/0xe0
> [260431.887486]  [<ffffffff81135910>] perf_ftrace_function_call+0xc0/0xd0

This is the perf function tracing call.

> [260431.888417]  [<ffffffff81114d37>] ? ftrace_ops_control_func+0xe7/0x110
> [260431.889353]  [<ffffffff8107a320>] ? task_work_run+0xe0/0xe0
> [260431.890281]  [<ffffffff811079fb>] ? rcu_eqs_enter_common+0x5b/0x420
> [260431.891191]  [<ffffffff81114d37>] ftrace_ops_control_func+0xe7/0x110
> [260431.892088]  [<ffffffff8170ce00>] ftrace_call+0x5/0x2f

ftrace_call is the mcount trampoline. The only way to get there is via
function tracing, and function tracing should only be enabled by root.

> [260431.892975]  [<ffffffff81114cbb>] ? ftrace_ops_control_func+0x6b/0x110
> [260431.893862]  [<ffffffff8170ce00>] ? ftrace_call+0x5/0x2f
> [260431.894745]  [<ffffffff81097def>] ? local_clock+0x3f/0x50
> [260431.895631]  [<ffffffff8107a325>] ? debug_lockdep_rcu_enabled+0x5/0x40
> [260431.896516]  [<ffffffff8107a325>] ? debug_lockdep_rcu_enabled+0x5/0x40
> [260431.897387]  [<ffffffff811079fb>] ? rcu_eqs_enter_common+0x5b/0x420
> [260431.898264]  [<ffffffff81107e24>] rcu_eqs_enter+0x64/0xa0
> [260431.899133]  [<ffffffff8110c673>] rcu_user_enter+0x13/0x20
> [260431.899999]  [<ffffffff8114e67a>] user_enter+0x6a/0xd0
> [260431.900859]  [<ffffffff81010208>] syscall_trace_leave+0x78/0x150
> [260431.901712]  [<ffffffff8170d4af>] int_check_syscall_exit_work+0x34/0x3d

So my question to you. If you were not running perf or any other
tracing, and this is all just non-root user. How the hell did perf
function tracing get started on your box????

-- Steve

  reply	other threads:[~2013-08-26 18:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 14:58 suspicious RCU usage (perf) Dave Jones
2013-08-26 16:29 ` Paul E. McKenney
2013-08-26 17:30   ` Steven Rostedt
2013-08-26 17:50     ` Dave Jones
2013-08-26 18:18       ` Steven Rostedt [this message]
2013-08-26 18:29         ` Dave Jones
2013-08-26 19:03           ` Steven Rostedt
2013-08-27 12:16             ` Peter Zijlstra
2013-08-30 15:49               ` Frederic Weisbecker
2013-08-30 15:52               ` Frederic Weisbecker
2013-08-30 15:59                 ` Peter Zijlstra
2013-08-30 16:06                   ` Frederic Weisbecker
2013-08-26 19:43           ` David Ahern
2013-08-26 19:49             ` Dave Jones
2013-08-27 13:10               ` Steven Rostedt
2013-08-27 13:58                 ` David Ahern
2013-08-27 14:13                   ` Dave Jones

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=20130826141814.54dcaa89@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.