[lkml]   [2008]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/7] ftrace, PPC: use probe_kernel API to modify code

On Mon, 17 Nov 2008, Paul Mackerras wrote:

> Steven Rostedt writes:
> > Impact: use cleaner probe_kernel API over assembly
> >
> > Using probe_kernel_read/write interface is a much cleaner approach
> > than the current assembly version.
> Possibly naive question: how is it possible for the accesses to the
> instructions to fault, given that we are called through kstop_machine
> (according to the comment) and nothing else should be happening?

Actually, only start up and shutdown of the tracer goes through
kstop_machine. With the new code, it can happen before SMP starts (in
init/main.c) or on the module itself, before the module loads. But that's
not why we do the probe_kernel_* calls.

The reason for probe_kernel_ is because ftrace is very intrusive. Ingo and
I have been making ftrace very paranoid about anything it does. It does
not trust itself to be correct. If anything were to fail, it will warn and
shut itself down peacefully. So far, I have not seen these warnings, but
this is part of the robustness features that have been added since 2.6.27.

-- Steve

 \ /
  Last update: 2008-11-17 16:53    [W:0.082 / U:4.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site