diff options
author | Jason Baron <jbaron@redhat.com> | 2010-09-17 11:09:08 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-09-22 16:30:46 -0400 |
commit | 4c3ef6d79328c0e23ade60cbfc8d496123a6855c (patch) | |
tree | 4a28260548ff4ad507d12716d6cdaa6bc0451a87 /arch/x86/kernel/kprobes.c | |
parent | e0cf0cd49632552f063fb3ae58691946da45fb2e (diff) | |
download | op-kernel-dev-4c3ef6d79328c0e23ade60cbfc8d496123a6855c.zip op-kernel-dev-4c3ef6d79328c0e23ade60cbfc8d496123a6855c.tar.gz |
jump label: Add jump_label_text_reserved() to reserve jump points
Add a jump_label_text_reserved(void *start, void *end), so that other
pieces of code that want to modify kernel text, can first verify that
jump label has not reserved the instruction.
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <06236663a3a7b1c1f13576bb9eccb6d9c17b7bfe.1284733808.git.jbaron@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/x86/kernel/kprobes.c')
-rw-r--r-- | arch/x86/kernel/kprobes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index e05952a..1cbd54c 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -1218,7 +1218,8 @@ static int __kprobes copy_optimized_instructions(u8 *dest, u8 *src) } /* Check whether the address range is reserved */ if (ftrace_text_reserved(src, src + len - 1) || - alternatives_text_reserved(src, src + len - 1)) + alternatives_text_reserved(src, src + len - 1) || + jump_label_text_reserved(src, src + len - 1)) return -EBUSY; return len; |