x86: jprobe bugfix
authorMasami Hiramatsu <mhiramat@redhat.com>
Tue, 18 Dec 2007 17:05:58 +0000 (18:05 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 18 Dec 2007 17:05:58 +0000 (18:05 +0100)
commit29b6cd794e73eea7600541d06288a09861ffecb0
tree7f915b756058acc89cf3e85b75dcce0ec60a9e12
parentb4be625852618636a6b54908c4f9d90fb29dc549
x86: jprobe bugfix

jprobe for x86-64 may cause kernel page fault when the jprobe_return()
is called from incorrect function.

- Use jprobe_saved_regs instead getting it from stack.
  (Especially on x86-64, it may get incorrect data, because
   pt_regs can not be get by using container_of(rsp))
- Change the type of stack pointer to unsigned long *.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/kprobes_32.c
arch/x86/kernel/kprobes_64.c
include/asm-x86/kprobes_32.h
include/asm-x86/kprobes_64.h