From: fche@redhat.com (Frank Ch. Eigler)
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH 6/6][RFC] kprobes: Allow probe on ftrace reserved text (but move it)
Date: Fri, 27 Apr 2012 11:29:56 -0400 [thread overview]
Message-ID: <y0mk411mbuz.fsf@fche.csb> (raw)
In-Reply-To: <1335535294.28106.206.camel@gandalf.stny.rr.com> (Steven Rostedt's message of "Fri, 27 Apr 2012 10:01:34 -0400")
Steven Rostedt <rostedt@goodmis.org> writes:
> [...]
> What do you think of this patch?
> [...]
> + /*
> + * If the address is located on a ftrace nop, set the
> + * breakpoint to the following instruction.
> + */
> + ftrace_addr = ftrace_location((unsigned long)addr);
> + if (unlikely(ftrace_addr)) {
> + addr = (kprobe_opcode_t *)(ftrace_addr + MCOUNT_INSN_SIZE);
> + p->flags |= KPROBE_FLAG_MOVED;
> + }
> [...]
I suspect Masami intended that this flag is later used during int3
processing to subtract MCOUNT_INSN_SIZE back out from the pt_regs->ip
during kprobe_handler() if this flag was set.
- FChE
prev parent reply other threads:[~2012-04-27 15:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 2:29 [PATCH 0/6][RFC] tracing/kprobes: Get ready for -mfentry Steven Rostedt
2012-04-26 2:29 ` [PATCH 1/6][RFC] ftrace: Sort all function addresses, not just per page Steven Rostedt
2012-04-26 2:29 ` [PATCH 2/6][RFC] ftrace: Remove extra helper functions Steven Rostedt
2012-04-26 2:29 ` [PATCH 3/6][RFC] ftrace: Speed up search by skipping pages by address Steven Rostedt
2012-04-26 2:29 ` [PATCH 4/6][RFC] ftrace: Consolidate ftrace_location() and ftrace_text_reserved() Steven Rostedt
2012-04-26 2:29 ` [PATCH 5/6][RFC] ftrace: Return record ip addr for ftrace_location() Steven Rostedt
2012-04-26 2:29 ` [PATCH 6/6][RFC] kprobes: Allow probe on ftrace reserved text (but move it) Steven Rostedt
2012-04-26 10:12 ` Masami Hiramatsu
2012-04-27 14:01 ` Steven Rostedt
2012-04-27 15:29 ` Frank Ch. Eigler [this message]
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=y0mk411mbuz.fsf@fche.csb \
--to=fche@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=yrl.pp-manager.tt@hitachi.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.