From: "Abhishek Sagar" <sagar.abhishek@gmail.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: "Ingo Molnar" <mingo@elte.hu>,
"Thomas Gleixner" <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3][RFC] ftrace: track dynamic ftrace update failures
Date: Tue, 3 Jun 2008 09:43:05 +0530 [thread overview]
Message-ID: <863e9df20806022113w339257b1pa4c8a7762bab8bc1@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0806021354520.10366@gandalf.stny.rr.com>
On Mon, Jun 2, 2008 at 11:26 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> Hi Abhishek,
Hi Steven,
Thanks for reviewing my recent patches.
> Have you also taken into account adding and removing of modules? This can
> cause some funny behaviours with ftrace that can be rather dangerous.
I've tried to accommodate them (fixed the wrong use of
kernel_text_address). This makes
init and module function records eligible to be freed. Only core
kernel function update failures now get tracked/remembered.
There might still be a need to find a way to track external modifiers
of mcount call-sites such as (but not limited to) kprobes. Consider
this (rather long) contrived scenario:
1. Function foo gets recorded by ftrace.
2. Mcount call site of foo is patched with a NOP by ftraced.
3. foo gets 'enabled' by some ftrace filter rule. NOP changes to a
call to the function tracer.
4. A kprobe is registered on the mcount call-site. It places a trap
generating instruction at the
mcount call site and stores the call-to-function-tracer instruction
elsewhere internally.
5. Tracing is disabled by end user.
6. Disabling of foo fails because Kprobe had placed a trap at the
mcount call site.
7. foo still keeps getting traced because Kprobes will keep
single-stepping the call-to-function-tracer instruction each time the
mcount call site is executed.
Not sure what to do with such cases...
--
Regards,
Abhishek Sagar
next prev parent reply other threads:[~2008-06-03 4:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-01 16:17 Abhishek Sagar
2008-06-02 17:56 ` Steven Rostedt
2008-06-03 4:13 ` Abhishek Sagar [this message]
2008-06-03 13:00 ` Steven Rostedt
2008-06-03 15:27 ` Abhishek Sagar
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=863e9df20806022113w339257b1pa4c8a7762bab8bc1@mail.gmail.com \
--to=sagar.abhishek@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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
all inboxes | Powered by JetHome®