public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	"pt, masami" <masami.hiramatsu.pt@hitachi.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: trace: trace_kprobe.c always shows interrupts off
Date: Tue, 17 Nov 2015 16:35:35 +0000 (UTC)	[thread overview]
Message-ID: <559989072.111063.1447778135704.JavaMail.zimbra@efficios.com> (raw)

Hi,

I notice that trace_kprobe.c does local_save_flags() within
__kprobe_trace_func(), which is called (at least on x86) with
interrupts always disabled. This is then used as interrupt on/off
state within the recorded event, which is misleading.

I also don't understand why arch/x86/kernel/kprobes/ftrace.c
pre handler disables interrupts, considering the following
comment above arch/x86/kernel/kprobes/core.c: kprobe_int3_handler()

 * Interrupts are disabled on entry as trap3 is an interrupt gate and they
 * remain disabled throughout this function.

A struct pt_regs is received by this function, but I don't see
any way to get the state of irq enable/disable from struct pt_regs
across architectures.

Any thoughts on how to fix this ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

             reply	other threads:[~2015-11-17 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 16:35 Mathieu Desnoyers [this message]
2015-11-17 17:23 ` trace: trace_kprobe.c always shows interrupts off Steven Rostedt
2015-11-18  6:51   ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-18 13:11     ` Mathieu Desnoyers

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=559989072.111063.1447778135704.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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