lkml.org 
[lkml]   [2011]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH] kprobes: Add separate preempt_disabling for kprobes
From
Date
On Fri, 2011-07-01 at 14:09 +0900, Masami Hiramatsu wrote:

> BTW, on my tip tree, add_preempt_count (a.k.a. inc_preempt_count())
> is marked as __kprobes, so it can not be probed. Is there any change?
>

That is when debug or preempt tracer is enabled. Otherwise it's
hardcoded into whatever calls it:

#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER)
extern void add_preempt_count(int val);
extern void sub_preempt_count(int val);
#else
# define add_preempt_count(val) do { preempt_count() += (val); } while (0)
# define sub_preempt_count(val) do { preempt_count() -= (val); } while (0)
#endif


Anyway, it still doesn't help the place that reads preempt_count() and
then later uses the result. I hit the crash in schedule_bug() where it
increments preempt count, then reads it to see if it is only 1.

-- Steve




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