kprobes: allow to specify custom allocator for insn caches
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 11 Sep 2013 21:24:13 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:58:52 +0000 (15:58 -0700)
commitaf96397de8600232effbff43dc8b4ca20ddc02b1
treed236fe3b4d37d5439ee41497a0d179a0b7614883
parentc802d64a356b5cf349121ac4c5e005f037ce548d
kprobes: allow to specify custom allocator for insn caches

The current two insn slot caches both use module_alloc/module_free to
allocate and free insn slot cache pages.

For s390 this is not sufficient since there is the need to allocate insn
slots that are either within the vmalloc module area or within dma memory.

Therefore add a mechanism which allows to specify an own allocator for an
own insn slot cache.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kprobes.h
kernel/kprobes.c