From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: David Wilder <dwilder@us.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
martin.schwidefsky@de.ibm.com
Subject: Re: [patch] s390 kprobe fix instruction length calculation
Date: Thu, 16 Aug 2007 00:41:47 +0200 [thread overview]
Message-ID: <20070815224147.GB8741@osiris.ibm.com> (raw)
In-Reply-To: <46C370BC.40302@us.ibm.com>
On Wed, Aug 15, 2007 at 02:31:40PM -0700, David Wilder wrote:
> Placing a kprobe on "bc" instruction (s390/s390x) can cause an oops.
> The instruction length is encoded into the first two bits of the s390
> instruction. Kprobe is incorrectly computing the instruction length.
> The instruction length is used for determining what type of "fix-up" is
> needed for conditional branch instruction. The problem can bee seen by
> placing a kprobe on a "bc" instruction that will not branch. The results
> is that Kprobe incorrectly computes the new instruction pointer
> (psw.addr) after single stepping the instruction. The problem is
> corrected with this patch.
>
> /* save the instruction length (pop 5-5) in bytes */
> - switch (*(__u8 *) (ainsn->insn) >> 4) {
> + switch (*(__u8 *) (ainsn->insn) >> 6) {
> case 0:
Added to the s390 patch queue. Thanks! :)
prev parent reply other threads:[~2007-08-15 22:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-15 21:31 [patch] s390 kprobe fix instruction length calculation David Wilder
2007-08-15 22:41 ` Heiko Carstens [this message]
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=20070815224147.GB8741@osiris.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=dwilder@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.schwidefsky@de.ibm.com \
/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