[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0904211421260.18037@vinegar-pot.mit.edu>
Date: Tue, 21 Apr 2009 14:47:35 -0400 (EDT)
From: Tim Abbott <tabbott@....EDU>
To: Steven Rostedt <rostedt@...dmis.org>
cc: Rusty Russell <rusty@...tcorp.com.au>,
LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Anders Kaseorg <andersk@....edu>,
Jeffrey B Arnold <jbarnold@....edu>,
Arjan van de Ven <arjan@...radead.org>
Subject: Re: [PATCH 1/5] ftrace: use module notifier for function tracer
On Tue, 21 Apr 2009, Steven Rostedt wrote:
> > However, Ksplice does its run-pre matching checks outside stop_machine,
>
> Does Ksplice use break points to do the modification?
No, we use jump instructions.
> I'd be interested in knowing how Ksplice protects against the nastiness
> of code executing on one CPU that is being modified by another CPU.
The run-pre matching checks, which verify that the pre-patch code the user
gave Ksplice matches the running kernel, occur before stop_machine with
the module_mutex held. Then, inside stop_machine, we check that no thread
is in the process of executing a to-be-patched function before inserting
the jump instructions. We need the transition from the old code to the
new code to be atomic (i.e. no old code can run after any new code is
run). So, we need to check all the return addresses on each thread's
kernel stack as well as the instruction pointers.
-Tim Abbott
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists