diff options
author | 2005-11-07 01:00:12 -0800 | |
---|---|---|
committer | 2005-11-07 07:53:46 -0800 | |
commit | e7a510f92c1e482a7db05afd3cb84af1f4cfe0bc (patch) | |
tree | fc9eb17fc6788dc9319e134d17bd240dcf6f04a1 /include/asm-x86_64 | |
parent | [PATCH] Kprobes: Track kprobe on a per_cpu basis - sparc64 changes (diff) | |
download | linux-e7a510f92c1e482a7db05afd3cb84af1f4cfe0bc.tar.gz linux-e7a510f92c1e482a7db05afd3cb84af1f4cfe0bc.tar.bz2 linux-e7a510f92c1e482a7db05afd3cb84af1f4cfe0bc.zip |
[PATCH] Kprobes: Track kprobe on a per_cpu basis - x86_64 changes
x86_64 changes to track kprobe execution on a per-cpu basis. We now track the
kprobe state machine independently on each cpu using a arch specific kprobe
control block.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r-- | include/asm-x86_64/kprobes.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h index 6d6d883fdf6d..4dd7a7e148d4 100644 --- a/include/asm-x86_64/kprobes.h +++ b/include/asm-x86_64/kprobes.h @@ -25,6 +25,7 @@ */ #include <linux/types.h> #include <linux/ptrace.h> +#include <linux/percpu.h> struct pt_regs; @@ -48,6 +49,24 @@ struct arch_specific_insn { kprobe_opcode_t *insn; }; +struct prev_kprobe { + struct kprobe *kp; + unsigned long status; + unsigned long old_rflags; + unsigned long saved_rflags; +}; + +/* per-cpu kprobe control block */ +struct kprobe_ctlblk { + unsigned long kprobe_status; + unsigned long kprobe_old_rflags; + unsigned long kprobe_saved_rflags; + long *jprobe_saved_rsp; + struct pt_regs jprobe_saved_regs; + kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE]; + struct prev_kprobe prev_kprobe; +}; + /* trap3/1 are intr gates for kprobes. So, restore the status of IF, * if necessary, before executing the original int3/1 (trap) handler. */ |