Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6f47f97 authored by Anil S Keshavamurthy's avatar Anil S Keshavamurthy Committed by Linus Torvalds
Browse files

[PATCH] Notify page fault call chain



With this patch Kprobes now registers for page fault notifications only when
their is an active probe registered.  Once all the active probes are
unregistered their is no need to be notified of page faults and kprobes
unregisters itself from the page fault notifications.  Hence we will have ZERO
side effects when no probes are active.

Signed-off-by: default avatarAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3d5631e0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ typedef u8 kprobe_opcode_t;

#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)pentry
#define ARCH_SUPPORTS_KRETPROBES
#define  ARCH_INACTIVE_KPROBE_COUNT 0

void arch_remove_kprobe(struct kprobe *p);
void kretprobe_trampoline(void);
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ struct kprobe_ctlblk {
#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)pentry

#define ARCH_SUPPORTS_KRETPROBES
#define  ARCH_INACTIVE_KPROBE_COUNT 1

#define SLOT0_OPCODE_SHIFT	(37)
#define SLOT1_p1_OPCODE_SHIFT	(37 - (64-46))
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ typedef unsigned int kprobe_opcode_t;
			IS_TWI(instr) || IS_TDI(instr))

#define ARCH_SUPPORTS_KRETPROBES
#define  ARCH_INACTIVE_KPROBE_COUNT 1

void kretprobe_trampoline(void);
extern void arch_remove_kprobe(struct kprobe *p);

+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ typedef u32 kprobe_opcode_t;

#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)pentry
#define arch_remove_kprobe(p)	do {} while (0)
#define  ARCH_INACTIVE_KPROBE_COUNT 0

/* Architecture specific copy of original instruction*/
struct arch_specific_insn {
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ typedef u8 kprobe_opcode_t;

#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)pentry
#define ARCH_SUPPORTS_KRETPROBES
#define  ARCH_INACTIVE_KPROBE_COUNT 1

void kretprobe_trampoline(void);
extern void arch_remove_kprobe(struct kprobe *p);
Loading