Messages in this thread | | | Date | Fri, 21 Nov 2014 12:11:36 -0500 | From | Steven Rostedt <> | Subject | Re: frequent lockups in 3.18rc4 |
| |
On Fri, 21 Nov 2014 12:01:51 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:
> Looking at kernel/trace/trace_functions.c: function_trace_call() which is > registered with RECURSION_SAFE, I see that the recursion check is done > before the per_cpu_ptr() call to the dynamically allocated per_cpu data. > > It looks OK, but... > > Oh! but if we trace the page fault handler, and we fault here too > we just nuked the cr2 register. Not good.
Ah! Looking at the code, I see that do_page_fault (called from assembly) is marked notrace. And the first thing it does is:
unsigned long address = read_cr2();
And uses that. Thus if the function tracer were to fault on exception_enter() or __do_page_fautt(), the address wont be clobbered.
-- Steve
| |