Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101670
b: refs/heads/master
c: b76e59d
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Jun 26, 2008
1 parent 3842119 commit 61dd098
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d14b3dd6190af7ce4f88be68f8df828af6d44584
refs/heads/master: b76e59d1fb086c2fdac5d243e09786d6581f2026
9 changes: 9 additions & 0 deletions trunk/arch/powerpc/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ void __kprobes arch_remove_kprobe(struct kprobe *p)

static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
{
/* We turn off async exceptions to ensure that the single step will
* be for the instruction we have the kprobe on, if we dont its
* possible we'd get the single step reported for an exception handler
* like Decrementer or External Interrupt */
regs->msr &= ~MSR_EE;
regs->msr |= MSR_SE;

/*
Expand Down Expand Up @@ -376,6 +381,10 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
if (!cur)
return 0;

/* make sure we got here for instruction we have a kprobe on */
if (((unsigned long)cur->ainsn.insn + 4) != regs->nip)
return 0;

if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) {
kcb->kprobe_status = KPROBE_HIT_SSDONE;
cur->post_handler(cur, regs, 0);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
*
* flush_icache_range(unsigned long start, unsigned long stop)
*/
_GLOBAL(__flush_icache_range)
_KPROBE(__flush_icache_range)
BEGIN_FTR_SECTION
blr /* for 601, do nothing */
END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
Expand Down

0 comments on commit 61dd098

Please sign in to comment.