]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6
authorRabin Vincent <rabin.vincent@stericsson.com>
Wed, 4 Jul 2012 06:37:37 +0000 (07:37 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jul 2012 11:57:16 +0000 (12:57 +0100)
commit35e0d977112fd83c3b7b2824d29314286f0b3566
tree437a95d7a2b25659172cb4353b1511152e216a1c
parent1f5043c53cd1a664b9ca50676c99180a69ba2511
ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6

'sub pc, pc, #1b-2b+8-2' results in address<1:0> == '10'.

sub pc, pc, #const (== ADR pc, #const) performs an interworking branch
(BXWritePC()) on ARMv7+ and a simple branch (BranchWritePC()) on earlier
versions.

In ARM state, BXWritePC() is UNPREDICTABLE when address<1:0> == '10'.

In ARM state on ARMv6+, BranchWritePC() ignores address<1:0>.  Before
ARMv6, BranchWritePC() is UNPREDICTABLE if address<1:0> != '00'

So the instruction is UNPREDICTABLE both before and after v6.

Acked-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/kprobes-test-arm.c