From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Anders Kaseorg <andersk@MIT.EDU>
Cc: Masami Hiramatsu <mhiramat@redhat.com>,
Tim Abbott <tabbott@MIT.EDU>, Ingo Molnar <mingo@elte.hu>,
Rusty Russell <rusty@rustcorp.com.au>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jeffrey B Arnold <jbarnold@MIT.EDU>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Subject: Re: [PATCH 1/5] ftrace: use module notifier for function tracer
Date: Thu, 23 Apr 2009 15:57:54 -0400 [thread overview]
Message-ID: <20090423195754.GA24963@Krystal> (raw)
In-Reply-To: <alpine.DEB.2.00.0904221901190.7725@vinegar-pot.mit.edu>
* Anders Kaseorg (andersk@MIT.EDU) wrote:
> On Wed, 22 Apr 2009, Masami Hiramatsu wrote:
> > Could you also add "use text_poke() on x86" to your plan? :-)
>
> That should be possible now that it is usable inside stop_machine(). It
> would be nicer to have an API that isn’t x86-specific, though.
>
> Another issue is that Ksplice supports patching rodata as well as text,
> and text_poke() does not support changes bigger than PAGE_SIZE. Though
> perhaps text_poke() is not the right function for rodata patches anyway.
>
> > Hmm, I can't agree that we allow module to modify kernel text...
> > Is that possible to separate kernel-text swapping routine from Ksplice
> > module? In that case, we don't need to export text_mutex.
>
> No, it’s not enough for Ksplice to lock the kernel text only while
> actively swapping it. We also need to prevent changes to the kernel text
> while Ksplice is doing run-pre matching to ensure safety. This means that
> Ksplice wants to hold text_mutex for essentially the entire time it’s
> running.
>
how about a kernel Ksplice API which lets your patch modules get
their handlers executed under the right execution context ? E.g. :
int do_ksplice(void (*pre_hook)(struct blah *context),
void (*code_update_hook)(struct blah *context),
void (*post_hook)(struct blah *context));
Which returns either 0 or -ESOMETHING. It would take care of locking and
everything within core kernel code. The "patch" modules would simply
provide the functions that does the code updates, assuming that the
do_ksplice function makes sure to provide correct locking semantics.
This way, the kernel code-base would contain the tricky locking bits.
It seems much better than exporting the text_mutex to modules.
Mathieu
> Anders
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2009-04-23 19:58 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 2:18 [PATCH 0/5] [GIT PULL] updates for tip Steven Rostedt
2009-04-16 2:18 ` [PATCH 1/5] ftrace: use module notifier for function tracer Steven Rostedt
2009-04-16 15:36 ` Frederic Weisbecker
2009-04-16 15:53 ` Steven Rostedt
2009-04-17 11:44 ` Steven Rostedt
2009-04-19 11:25 ` Rusty Russell
2009-04-20 13:57 ` Steven Rostedt
2009-04-21 5:15 ` Rusty Russell
2009-04-21 13:13 ` Steven Rostedt
2009-04-21 13:58 ` Ingo Molnar
2009-04-21 17:51 ` Tim Abbott
2009-04-21 18:17 ` Steven Rostedt
2009-04-21 18:47 ` Tim Abbott
2009-04-22 9:16 ` Ingo Molnar
2009-04-22 22:20 ` Tim Abbott
2009-04-22 22:57 ` Masami Hiramatsu
2009-04-23 19:40 ` Anders Kaseorg
2009-04-23 19:57 ` Mathieu Desnoyers [this message]
2009-04-23 22:31 ` Tim Abbott
2009-04-24 3:11 ` Masami Hiramatsu
2009-04-23 20:06 ` Masami Hiramatsu
2009-04-16 2:18 ` [PATCH 2/5] tracing/events: add startup tests for events Steven Rostedt
2009-04-16 8:39 ` [PATCH] tracing: add #include <linux/delay.h> to fix build failure in test_work() Ingo Molnar
2009-04-16 14:08 ` Steven Rostedt
2009-04-17 0:30 ` Ingo Molnar
2009-04-16 15:41 ` [PATCH 2/5] tracing/events: add startup tests for events Frederic Weisbecker
2009-04-16 15:51 ` Steven Rostedt
2009-04-16 16:02 ` Frederic Weisbecker
2009-04-16 2:18 ` [PATCH 3/5] tracing/events: add rcu locking around trace event prints Steven Rostedt
2009-04-17 14:08 ` Steven Rostedt
2009-04-17 15:20 ` Jeremy Fitzhardinge
2009-04-17 15:42 ` Steven Rostedt
2009-04-17 23:53 ` Jeremy Fitzhardinge
2009-04-17 16:18 ` Theodore Tso
2009-04-17 16:32 ` Jeremy Fitzhardinge
2009-04-17 16:41 ` Steven Rostedt
2009-05-07 2:10 ` Steven Rostedt
2009-05-07 11:32 ` Ingo Molnar
2009-05-07 13:10 ` Steven Rostedt
2009-04-16 2:18 ` [PATCH 4/5] tracing/events/ring-buffer: expose format of ring buffer headers to users Steven Rostedt
2009-04-16 2:18 ` [PATCH 5/5] tracing: add saved_cmdlines file to show cached task comms Steven Rostedt
2009-04-16 15:54 ` Frederic Weisbecker
2009-04-16 15:58 ` Steven Rostedt
2009-04-16 16:05 ` Frederic Weisbecker
2009-04-16 9:51 ` [PATCH 0/5] [GIT PULL] updates for tip Ingo Molnar
2009-04-16 9:53 ` Ingo Molnar
2009-04-16 13:52 ` Steven Rostedt
2009-04-16 16:12 ` Ingo Molnar
2009-04-16 16:22 ` Steven Rostedt
2009-04-17 0:29 ` Ingo Molnar
2009-04-16 16:30 ` Ingo Molnar
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=20090423195754.GA24963@Krystal \
--to=mathieu.desnoyers@polymtl.ca \
--cc=akpm@linux-foundation.org \
--cc=ananth@in.ibm.com \
--cc=andersk@MIT.EDU \
--cc=fweisbec@gmail.com \
--cc=jbarnold@MIT.EDU \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
--cc=tabbott@MIT.EDU \
--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;
as well as URLs for NNTP newsgroup(s).