mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] Kprobes: Track kprobe on a per_cpu basis - i386 changes
I386 changes to track kprobe execution on a per-cpu basis. We now track the kprobe state machine independently on each cpu, using an arch specific kprobe control block. Signed-off-by: Ananth N Mavinakayanahalli <[email protected]> Signed-off-by: Anil S Keshavamurthy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e65845235c
commit
9a0e3a8683
2 changed files with 86 additions and 57 deletions
|
|
@ -49,6 +49,23 @@ struct arch_specific_insn {
|
|||
kprobe_opcode_t insn[MAX_INSN_SIZE];
|
||||
};
|
||||
|
||||
struct prev_kprobe {
|
||||
struct kprobe *kp;
|
||||
unsigned long status;
|
||||
unsigned long old_eflags;
|
||||
unsigned long saved_eflags;
|
||||
};
|
||||
|
||||
/* per-cpu kprobe control block */
|
||||
struct kprobe_ctlblk {
|
||||
unsigned long kprobe_status;
|
||||
unsigned long kprobe_old_eflags;
|
||||
unsigned long kprobe_saved_eflags;
|
||||
long *jprobe_saved_esp;
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue