ARM: kprobes: Decode 16-bit Thumb branch instructions
authorJon Medhurst <tixy@yxit.co.uk>
Sat, 2 Jul 2011 15:30:43 +0000 (16:30 +0100)
committerTixy <tixy@medhuaa1.miniserver.com>
Wed, 13 Jul 2011 17:32:45 +0000 (17:32 +0000)
commit396b41f68d937a0c48ba624186ed06288b35bb4e
treef9e034023f80db80a7b446ce552432dc637e9455
parent444956677eccfcdfe05de761e1286f62c423ce88
ARM: kprobes: Decode 16-bit Thumb branch instructions

We previously changed the behaviour of probes so that conditional
instructions don't fire when the condition isn't met. For ARM branches,
and Thumb branches in IT blocks, this means they don't fire if the
branch isn't taken.

For consistency, we implement the same for Thumb conditional branch
instructions. This involves setting up insn_check_cc to point to the
relevant condition checking function. As the emulation routine is only
called when this condition passes, it doesn't need to check again and
can unconditionally update PC.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
arch/arm/kernel/kprobes-thumb.c