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

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

[PATCH] kprobes: arch_remove_kprobe



Currently arch_remove_kprobes() is only implemented/required for x86_64 and
powerpc.  All other architecture like IA64, i386 and sparc64 implementes a
dummy function which is being called from arch independent kprobes.c file.

This patch removes the dummy functions and replaces it with
#define arch_remove_kprobe(p, s)	do { } while(0)

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 f709b122
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -77,10 +77,6 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
			   (unsigned long) p->addr + sizeof(kprobe_opcode_t));
}

void __kprobes arch_remove_kprobe(struct kprobe *p)
{
}

static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
{
	kcb->prev_kprobe.kp = kprobe_running();
+0 −4
Original line number Diff line number Diff line
@@ -467,10 +467,6 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
	flush_icache_range(arm_addr, arm_addr + sizeof(bundle_t));
}

void __kprobes arch_remove_kprobe(struct kprobe *p)
{
}

/*
 * We are resuming execution after a single step fault, so the pt_regs
 * structure reflects the register state after we executed the instruction
+3 −1
Original line number Diff line number Diff line
@@ -80,9 +80,11 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
			   (unsigned long) p->addr + sizeof(kprobe_opcode_t));
}

void __kprobes arch_remove_kprobe(struct kprobe *p)
void __kprobes arch_remove_kprobe(struct kprobe *p, struct semaphore *s)
{
	down(s);
	free_insn_slot(p->ainsn.insn);
	up(s);
}

static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
+0 −4
Original line number Diff line number Diff line
@@ -61,10 +61,6 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
	flushi(p->addr);
}

void __kprobes arch_remove_kprobe(struct kprobe *p)
{
}

static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
{
	kcb->prev_kprobe.kp = kprobe_running();
+3 −1
Original line number Diff line number Diff line
@@ -220,9 +220,11 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
			   (unsigned long) p->addr + sizeof(kprobe_opcode_t));
}

void __kprobes arch_remove_kprobe(struct kprobe *p)
void __kprobes arch_remove_kprobe(struct kprobe *p, struct semaphore *s)
{
	down(s);
	free_insn_slot(p->ainsn.insn);
	up(s);
}

static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
Loading