Re: [PATCH] x86 trace: Fix page fault tracing bug

2014-02-28 Thread Steven Rostedt
On Fri, Feb 28, 2014 at 04:33:40PM +0100, Jiri Olsa wrote: > The trace_do_page_fault function trigger tracepoint > and then handles the actual page fault. > > This could lead to error if the tracepoint caused page > fault. The original cr2 value gets lost and the original > page fault handler kill

Re: [PATCH] x86 trace: Fix page fault tracing bug

2014-02-28 Thread Steven Rostedt
Vince, can you test this patch instead. Seems that the bug you found was found by others. You can remove all patches again, and modify this patch such that the read of cr2 is before the exception_enter() call (in both locations) On Fri, Feb 28, 2014 at 04:47:15PM +0100, Jiri Olsa wrote: > On Fri,

Re: [PATCH] x86 trace: Fix page fault tracing bug

2014-02-28 Thread Jiri Olsa
On Fri, Feb 28, 2014 at 04:33:40PM +0100, Jiri Olsa wrote: > The trace_do_page_fault function trigger tracepoint > and then handles the actual page fault. > > This could lead to error if the tracepoint caused page > fault. The original cr2 value gets lost and the original > page fault handler kill

Re: [PATCH] x86 trace: Fix page fault tracing bug

2014-02-28 Thread Peter Zijlstra
On Fri, Feb 28, 2014 at 04:33:40PM +0100, Jiri Olsa wrote: While I like the idea of just pushing up the CR2 read; the below does the read too late still, exception_enter() also has a tracepoint in. > @@ -1267,9 +1269,18 @@ dotraplinkage void __kprobes > trace_do_page_fault(struct pt_regs *regs,

[PATCH] x86 trace: Fix page fault tracing bug

2014-02-28 Thread Jiri Olsa
The trace_do_page_fault function trigger tracepoint and then handles the actual page fault. This could lead to error if the tracepoint caused page fault. The original cr2 value gets lost and the original page fault handler kills current process with SIGSEGV. This happens if you record page faults