Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c5f225f1a2c67c57ff5dfbe0589de20c5706a16
Commit:     9c5f225f1a2c67c57ff5dfbe0589de20c5706a16
Parent:     9b5a03e198c951225d0deb05f3107a4631791266
Author:     David Wilder <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 22 13:51:44 2007 +0200
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Wed Aug 22 13:51:49 2007 +0200

    [S390] kprobes: fix instruction length calculation
    
    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.
    
    Signed-off-by: David Wilder <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
    Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]>
---
 arch/s390/kernel/kprobes.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index 358d2bb..e40373d 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -85,7 +85,7 @@ void __kprobes get_instruction_type(struct arch_specific_insn 
*ainsn)
        ainsn->reg = (*ainsn->insn & 0xf0) >> 4;
 
        /* save the instruction length (pop 5-5) in bytes */
-       switch (*(__u8 *) (ainsn->insn) >> 4) {
+       switch (*(__u8 *) (ainsn->insn) >> 6) {
        case 0:
                ainsn->ilen = 2;
                break;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to