lkml.org 
[lkml]   [2011]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] kprobes crashing because of preempt count
On Fri, Jul 01, 2011 at 10:12:03AM +0900, Masami Hiramatsu wrote:
> (2011/06/30 22:23), Steven Rostedt wrote:

...

> > Do we really need to have preemption disabled throughout this? Is it
> > because we don't want to migrate or call schedule? Not sure what the
> > best way to fix this is. Perhaps we add a kprobe_preempt_disable() that
> > is checked as well?
>
> I think the best way to do that is just removing preemption disabling
> code, because
> - breakpoint exception itself disables interrupt (at least on x86)
> - While single stepping, interrupts also be disabled.

On 64-bit powerpc, kprobe handlers are run with interrupts enabled
(MSR_EE = 1), but most instructions (including loads/stores) are
emulated, so for the most part, we don't take the sstep exception.

Ananth


\
 
 \ /
  Last update: 2011-07-01 13:39    [W:1.916 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site