summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2014-02-28 17:05:26 +0100
committerH. Peter Anvin <hpa@linux.intel.com>2014-03-04 16:00:14 -0800
commit0ac09f9f8cd1fb028a48330edba6023d347d3cea (patch)
tree6c0552e39b416d90334dd488fe7ce82e3318bb46 /fs
parent3c0b566334c9942c89927bd1b5ad2f32baab81fa (diff)
downloadop-kernel-dev-0ac09f9f8cd1fb028a48330edba6023d347d3cea.zip
op-kernel-dev-0ac09f9f8cd1fb028a48330edba6023d347d3cea.tar.gz
x86, trace: Fix CR2 corruption when tracing page faults
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 with callchain data, the user part of it will cause tracepoint handler to page fault: # perf record -g -e exceptions:page_fault_user ls Fixing this by saving the original cr2 value and using it after tracepoint handler is done. v2: Moving the cr2 read before exception_enter, because it could trigger tracepoint as well. Reported-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Reported-by: Vince Weaver <vincent.weaver@maine.edu> Tested-by: Vince Weaver <vincent.weaver@maine.edu> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Seiji Aguchi <seiji.aguchi@hds.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1402211701380.6395@vincent-weaver-1.um.maine.edu Link: http://lkml.kernel.org/r/20140228160526.GD1133@krava.brq.redhat.com
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud