Commit 43627582 authored by Srinivasa Ds's avatar Srinivasa Ds Committed by Linus Torvalds

kprobes: refuse kprobe insertion on add/sub_preempt_counter()

Kprobes makes use of preempt_disable(),preempt_enable_noresched() and these
functions inturn call add/sub_preempt_count().  So we need to refuse user from
inserting probe in to these functions.

This patch disallows user from probing add/sub_preempt_count().
Signed-off-by: default avatarSrinivasa DS <srinivasa@in.ibm.com>
Acked-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0835ab53
...@@ -3766,7 +3766,7 @@ void scheduler_tick(void) ...@@ -3766,7 +3766,7 @@ void scheduler_tick(void)
#if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT) #if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
void add_preempt_count(int val) void __kprobes add_preempt_count(int val)
{ {
/* /*
* Underflow? * Underflow?
...@@ -3782,7 +3782,7 @@ void add_preempt_count(int val) ...@@ -3782,7 +3782,7 @@ void add_preempt_count(int val)
} }
EXPORT_SYMBOL(add_preempt_count); EXPORT_SYMBOL(add_preempt_count);
void sub_preempt_count(int val) void __kprobes sub_preempt_count(int val)
{ {
/* /*
* Underflow? * Underflow?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment