]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Kprobes ia64 qp fix
authorRusty Lynch <rusty.lynch@intel.com>
Thu, 23 Jun 2005 07:09:31 +0000 (00:09 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:23 +0000 (09:45 -0700)
Fix a bug where a kprobe still fires when the instruction is predicated
off.  So given the p6=0, and we have an instruction like:

(p6) move loc1=0

we should not be triggering the kprobe.  This is handled by carrying over
the qp section of the original instruction into the break instruction.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Rusty Lynch <Rusty.lynch@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ia64/kernel/kprobes.c

index b7a204137fbb5b24b7aefa7e77e5f905ffff12e7..98bef04d948459390f267d2bd98af318e230a494 100644 (file)
@@ -115,19 +115,19 @@ int arch_prepare_kprobe(struct kprobe *p)
        case 0:
                major_opcode = (bundle->quad0.slot0 >> SLOT0_OPCODE_SHIFT);
                kprobe_inst = bundle->quad0.slot0;
-               bundle->quad0.slot0 = BREAK_INST;
+               bundle->quad0.slot0 = BREAK_INST | (0x3f & kprobe_inst);
                break;
        case 1:
                major_opcode = (bundle->quad1.slot1_p1 >> SLOT1_p1_OPCODE_SHIFT);
                kprobe_inst = (bundle->quad0.slot1_p0 |
                                (bundle->quad1.slot1_p1 << (64-46)));
-               bundle->quad0.slot1_p0 = BREAK_INST;
+               bundle->quad0.slot1_p0 = BREAK_INST | (0x3f & kprobe_inst);
                bundle->quad1.slot1_p1 = (BREAK_INST >> (64-46));
                break;
        case 2:
                major_opcode = (bundle->quad1.slot2 >> SLOT2_OPCODE_SHIFT);
                kprobe_inst = bundle->quad1.slot2;
-               bundle->quad1.slot2 = BREAK_INST;
+               bundle->quad1.slot2 = BREAK_INST | (0x3f & kprobe_inst);
                break;
        }