aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@in.ibm.com>2005-11-07 04:00:12 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:46 -0500
commite7a510f92c1e482a7db05afd3cb84af1f4cfe0bc (patch)
treefc9eb17fc6788dc9319e134d17bd240dcf6f04a1 /include/asm-x86_64
parentf215d985e936cf493959b365a10593b6d5f80447 (diff)
[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.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h
index 6d6d883fdf6..4dd7a7e148d 100644
--- a/include/asm-x86_64/kprobes.h
+++ b/include/asm-x86_64/kprobes.h
@@ -25,6 +25,7 @@
25 */ 25 */
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/ptrace.h> 27#include <linux/ptrace.h>
28#include <linux/percpu.h>
28 29
29struct pt_regs; 30struct pt_regs;
30 31
@@ -48,6 +49,24 @@ struct arch_specific_insn {
48 kprobe_opcode_t *insn; 49 kprobe_opcode_t *insn;
49}; 50};
50 51
52struct prev_kprobe {
53 struct kprobe *kp;
54 unsigned long status;
55 unsigned long old_rflags;
56 unsigned long saved_rflags;
57};
58
59/* per-cpu kprobe control block */
60struct kprobe_ctlblk {
61 unsigned long kprobe_status;
62 unsigned long kprobe_old_rflags;
63 unsigned long kprobe_saved_rflags;
64 long *jprobe_saved_rsp;
65 struct pt_regs jprobe_saved_regs;
66 kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
67 struct prev_kprobe prev_kprobe;
68};
69
51/* trap3/1 are intr gates for kprobes. So, restore the status of IF, 70/* trap3/1 are intr gates for kprobes. So, restore the status of IF,
52 * if necessary, before executing the original int3/1 (trap) handler. 71 * if necessary, before executing the original int3/1 (trap) handler.
53 */ 72 */