From: Srinivasa Ds Date: Mon, 28 Apr 2008 09:14:26 +0000 (-0700) Subject: kprobes: prevent probing of preempt_schedule() X-Git-Tag: v2.6.26-rc1~874 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d8d996e0ca5b4093203d3f050b0f70b5c949ae8;p=pandora-kernel.git kprobes: prevent probing of preempt_schedule() Prohibit users from probing preempt_schedule(). One way of prohibiting the user from probing functions is by marking such functions with __kprobes. But this method doesn't work for those functions, which are already marked to different section like preempt_schedule() (belongs to __sched section). So we use blacklist approach to refuse user from probing these functions. In blacklist approach we populate the blacklisted function's starting address and its size in kprobe_blacklist structure. Then we verify the user specified address against start and end of the blacklisted function. So any attempt to register probe on blacklisted functions will be rejected. [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Srinivasa DS Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Jim Keniston Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed