From: Rusty Lynch <rusty.lynch@intel.com>
To: akpm@osdl.org
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
Rusty Lynch <rusty.lynch@intel.com>
Subject: [patch] Kprobes ia64 qp fix
Date: Thu, 26 May 2005 17:51:45 +0000 [thread overview]
Message-ID: <200505261751.j4QHpjei009076@linux.jf.intel.com> (raw)
The following patch is for the 2.6.12-rc5-mm1 + my previous
"Kprobes ia64 cleanup" patch that fixes 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.
--rusty
signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
signed-off-by: Rusty Lynch <Rusty.lynch@intel.com>
arch/ia64/kernel/kprobes.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6.12-rc5/arch/ia64/kernel/kprobes.c
=================================--- linux-2.6.12-rc5.orig/arch/ia64/kernel/kprobes.c
+++ linux-2.6.12-rc5/arch/ia64/kernel/kprobes.c
@@ -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;
}
next reply other threads:[~2005-05-26 17:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-26 17:51 Rusty Lynch [this message]
2005-05-26 18:18 ` [patch] Kprobes ia64 qp fix David Mosberger
2005-05-26 18:23 ` Lynch, Rusty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200505261751.j4QHpjei009076@linux.jf.intel.com \
--to=rusty.lynch@intel.com \
--cc=akpm@osdl.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox