[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200802201545.17986.srinivasa@in.ibm.com>
Date: Wed, 20 Feb 2008 15:45:17 +0530
From: Srinivasa Ds <srinivasa@...ibm.com>
To: Andrew Morton <akpm@...ux-foundation.org>, ananth@...ibm.com,
Jim Keniston <jkenisto@...ibm.com>,
linux-kernel@...r.kernel.org, srikar@...ux.vnet.ibm.com
Subject: [RFC] [PATCH] 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: Srinivasa DS <srinivasa@...ibm.com>
---
kernel/sched.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.25-rc2/kernel/sched.c
===================================================================
--- linux-2.6.25-rc2.orig/kernel/sched.c
+++ linux-2.6.25-rc2/kernel/sched.c
@@ -3766,7 +3766,7 @@ void scheduler_tick(void)
#if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
-void add_preempt_count(int val)
+void __kprobes add_preempt_count(int val)
{
/*
* Underflow?
@@ -3782,7 +3782,7 @@ void add_preempt_count(int val)
}
EXPORT_SYMBOL(add_preempt_count);
-void sub_preempt_count(int val)
+void __kprobes sub_preempt_count(int val)
{
/*
* Underflow?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists