| From stable-bounces@linux.kernel.org Thu May 1 09:33:49 2008 |
| From: Lennert Buytenhek <buytenh@wantstofly.org> |
| Date: Thu, 01 May 2008 11:04:55 -0400 (EDT) |
| Subject: kprobes/arm: fix decoding of arithmetic immediate instructions |
| To: stable@kernel.org |
| Message-ID: <alpine.LFD.1.10.0805011103180.23581@xanadu.home> |
| |
| From: Lennert Buytenhek <buytenh@wantstofly.org> |
| |
| The ARM kprobes arithmetic immediate instruction decoder |
| (space_cccc_001x()) was accidentally zero'ing out not only the Rn and |
| Rd arguments, but the lower nibble of the immediate argument as well |
| -- this patch fixes this. |
| |
| Mainline commit: a3fd133c24e16d430ba21f3d9f5c0b8faeeb37fe |
| |
| Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> |
| Acked-by: Nicolas Pitre <nico@marvell.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| |
| --- |
| arch/arm/kernel/kprobes-decode.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/arch/arm/kernel/kprobes-decode.c |
| +++ b/arch/arm/kernel/kprobes-decode.c |
| @@ -1176,7 +1176,7 @@ space_cccc_001x(kprobe_opcode_t insn, st |
| * *S (bit 20) updates condition codes |
| * ADC/SBC/RSC reads the C flag |
| */ |
| - insn &= 0xfff00ff0; /* Rn = r0, Rd = r0 */ |
| + insn &= 0xfff00fff; /* Rn = r0, Rd = r0 */ |
| asi->insn[0] = insn; |
| asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ |
| emulate_alu_imm_rwflags : emulate_alu_imm_rflags; |