linux/arch
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
..
alpha mm: fault feedback #2 2007-07-19 10:04:41 -07:00
arm mm: fault feedback #2 2007-07-19 10:04:41 -07:00
arm26 mm: fault feedback #2 2007-07-19 10:04:41 -07:00
avr32 mm: fault feedback #2 2007-07-19 10:04:41 -07:00
blackfin Blackfin arch: add missing CONFIG_LARGE_ALLOCS when upstream merging 2007-07-12 14:55:05 +08:00
cris unregister_chrdev(): ignore the return value 2007-07-19 10:04:43 -07:00
frv mm: fault feedback #2 2007-07-19 10:04:41 -07:00
h8300 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
i386 PM: Integrate beeping flag with existing acpi_sleep flags 2007-07-19 10:04:43 -07:00
ia64 jprobes: make jprobes a little safer for users 2007-07-19 10:04:44 -07:00
m32r mm: fault feedback #2 2007-07-19 10:04:41 -07:00
m68k mm: fault feedback #2 2007-07-19 10:04:41 -07:00
m68knommu PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
mips mm: fault feedback #2 2007-07-19 10:04:41 -07:00
parisc mm: fault feedback #2 2007-07-19 10:04:41 -07:00
powerpc jprobes: make jprobes a little safer for users 2007-07-19 10:04:44 -07:00
ppc mm: fault feedback #2 2007-07-19 10:04:41 -07:00
s390 mm: fault feedback #2 2007-07-19 10:04:41 -07:00
sh mm: fault feedback #2 2007-07-19 10:04:41 -07:00
sh64 mm: fault feedback #2 2007-07-19 10:04:41 -07:00
sparc mm: fault feedback #2 2007-07-19 10:04:41 -07:00
sparc64 unregister_chrdev(): ignore the return value 2007-07-19 10:04:43 -07:00
um mm: fault feedback #2 2007-07-19 10:04:41 -07:00
v850 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
x86_64 PM: Integrate beeping flag with existing acpi_sleep flags 2007-07-19 10:04:43 -07:00
xtensa mm: fault feedback #2 2007-07-19 10:04:41 -07:00