diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-04-12 07:45:21 +0100 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-04-28 23:40:57 -0400 |
commit | 81ff5720b9561b48e3dc640ca15799ba3919f5a6 (patch) | |
tree | e797609d19ef16bbf3a3314c0f044ff123bbc0d9 /arch/arm | |
parent | 5c6b76fc7d8220e8f00e7a49fb56ca852d7fb661 (diff) | |
download | kernel_samsung_aries-81ff5720b9561b48e3dc640ca15799ba3919f5a6.zip kernel_samsung_aries-81ff5720b9561b48e3dc640ca15799ba3919f5a6.tar.gz kernel_samsung_aries-81ff5720b9561b48e3dc640ca15799ba3919f5a6.tar.bz2 |
ARM: kprobes: Reject probing of LDRB instructions which load PC
These instructions are specified as UNPREDICTABLE.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/kprobes-decode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index 826abc1..a37745f 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c @@ -1416,6 +1416,10 @@ space_cccc_01xx(kprobe_opcode_t insn, struct arch_specific_insn *asi) /* STRB : cccc 01xx x1x0 xxxx xxxx xxxx xxxx xxxx */ /* STRBT : cccc 01x0 x110 xxxx xxxx xxxx xxxx xxxx */ /* STRT : cccc 01x0 x010 xxxx xxxx xxxx xxxx xxxx */ + + if ((insn & 0x00500000) == 0x00500000 && is_r15(insn, 12)) + return INSN_REJECTED; /* LDRB into PC */ + return prep_emulate_ldr_str(insn, asi); } |