Michael Ellerman 3d7e33825d jprobes: make jprobes a little safer for users
I realise jprobes are a razor-blades-included type of interface, but that
doesn't mean we can't try and make them safer to use.  This guy I know once
wrote code like this:

struct jprobe jp = { .kp.symbol_name = "foo", .entry = "jprobe_foo" };

And then his kernel exploded. Oops.

This patch adds an arch hook, arch_deref_entry_point() (I don't like it
either) which takes the void * in a struct jprobe, and gives back the text
address that it represents.

We can then use that in register_jprobe() to check that the entry point we're
passed is actually in the kernel text, rather than just some random value.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19 10:04:44 -07:00
..
2007-07-12 15:41:24 -07:00
2007-07-17 10:23:05 -07:00
2007-07-19 10:04:43 -07:00
2007-07-13 08:06:14 -07:00
2007-07-16 09:05:47 -07:00
2007-07-10 17:18:59 -07:00
2007-07-16 09:05:46 -07:00
2007-07-17 10:23:04 -07:00
2007-07-11 16:09:00 -07:00
2007-07-12 10:55:56 -07:00
2007-07-17 10:23:06 -07:00
2007-07-16 09:05:52 -07:00
2007-07-16 09:05:52 -07:00
2007-07-18 09:15:20 -04:00
2007-07-18 09:15:20 -04:00
2007-07-17 10:23:13 -07:00
2007-07-16 09:05:45 -07:00
2007-07-19 10:04:44 -07:00
2007-07-18 18:29:37 -04:00
2007-07-16 09:05:41 -07:00
2007-07-17 10:22:59 -07:00
2007-07-19 10:04:41 -07:00
2007-07-16 09:05:34 -07:00
2007-07-10 22:15:03 -07:00
2007-07-14 18:55:06 -07:00
2007-07-16 09:05:47 -07:00
2007-07-16 09:05:50 -07:00
2007-07-16 09:05:47 -07:00
2007-07-10 22:16:44 -07:00
2007-07-16 09:05:46 -07:00
2007-07-18 08:47:40 -07:00
2007-07-10 22:15:26 -07:00
2007-07-10 21:30:33 -04:00
2007-07-17 10:23:03 -07:00
2007-07-17 10:23:13 -07:00
2007-07-16 09:05:34 -07:00
2007-07-18 08:47:45 -07:00
2007-07-17 10:22:59 -07:00
2007-07-16 09:05:42 -07:00
2007-07-10 17:33:05 +01:00
2007-07-16 09:05:51 -07:00
2007-07-16 09:05:40 -07:00
2007-07-19 10:04:42 -07:00
2007-07-16 09:05:50 -07:00
2007-07-16 09:05:46 -07:00
2007-07-17 10:23:03 -07:00
2007-07-18 08:47:40 -07:00
2007-07-16 09:05:47 -07:00
2007-07-16 09:05:50 -07:00
2007-07-18 08:38:22 -07:00
2007-07-16 09:05:45 -07:00
2007-07-16 09:05:46 -07:00
2007-07-16 09:05:40 -07:00
2007-07-18 08:47:40 -07:00
2007-07-17 10:22:59 -07:00
2007-07-16 09:05:47 -07:00
2007-07-18 15:57:15 -07:00
2007-07-12 16:34:40 -07:00
2007-07-16 09:05:47 -07:00
2007-07-18 08:47:41 -07:00
2007-07-17 10:22:59 -07:00