lkml.org 
[lkml]   [2015]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjecttrace: trace_kprobe.c always shows interrupts off
Hi,

I notice that trace_kprobe.c does local_save_flags() within
__kprobe_trace_func(), which is called (at least on x86) with
interrupts always disabled. This is then used as interrupt on/off
state within the recorded event, which is misleading.

I also don't understand why arch/x86/kernel/kprobes/ftrace.c
pre handler disables interrupts, considering the following
comment above arch/x86/kernel/kprobes/core.c: kprobe_int3_handler()

* Interrupts are disabled on entry as trap3 is an interrupt gate and they
* remain disabled throughout this function.

A struct pt_regs is received by this function, but I don't see
any way to get the state of irq enable/disable from struct pt_regs
across architectures.

Any thoughts on how to fix this ?

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


\
 
 \ /
  Last update: 2015-11-17 18:01    [W:0.052 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site