aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
authorSeiji Aguchi <seiji.aguchi@hds.com>2013-10-30 16:37:00 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2013-11-08 17:15:45 -0500
commit25c74b10bacead867478480170083f69cfc0db48 (patch)
tree750066787398c55825485341988e19af9776b562 /arch/x86/mm/fault.c
parent959c071f0974cda7702d7574647de7ad9259eb57 (diff)
x86, trace: Register exception handler to trace IDT
This patch registers exception handlers for tracing to a trace IDT. To implemented it in set_intr_gate(), this patch does followings. - Register the exception handlers to the trace IDT by prepending "trace_" to the handler's names. - Also, newly introduce trace_page_fault() to add tracepoints in a subsequent patch. Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com> Link: http://lkml.kernel.org/r/52716DEC.5050204@hds.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 3aaeffcfd67a..fd3e281fbc70 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -1231,3 +1231,13 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
1231 __do_page_fault(regs, error_code); 1231 __do_page_fault(regs, error_code);
1232 exception_exit(prev_state); 1232 exception_exit(prev_state);
1233} 1233}
1234
1235dotraplinkage void __kprobes
1236trace_do_page_fault(struct pt_regs *regs, unsigned long error_code)
1237{
1238 enum ctx_state prev_state;
1239
1240 prev_state = exception_enter();
1241 __do_page_fault(regs, error_code);
1242 exception_exit(prev_state);
1243}