From 0a188ccb5eceb58101fcc11b3ec2d860ccbf92a3 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Sat, 2 Jul 2011 16:39:07 +0100 Subject: ARM: kprobes: Reject 16-bit Thumb SETEND, CPS and BKPT instructions These are very rare and/or problematic to emulate so we will take the easy option and disallow probing them (as does the existing ARM implementation). Rejecting these instructions doesn't actually require any entries in the decoding table as it is the default case for instructions which aren't found. Signed-off-by: Jon Medhurst Acked-by: Nicolas Pitre --- arch/arm/kernel/kprobes-thumb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/kernel/kprobes-thumb.c') diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/kernel/kprobes-thumb.c index d3133fd2d4e8..554578bc5f09 100644 --- a/arch/arm/kernel/kprobes-thumb.c +++ b/arch/arm/kernel/kprobes-thumb.c @@ -373,6 +373,10 @@ static const union decode_item t16_table_1011[] = { /* IT 1011 1111 xxxx xxxx */ DECODE_CUSTOM (0xff00, 0xbf00, t16_decode_it), + /* SETEND 1011 0110 010x xxxx */ + /* CPS 1011 0110 011x xxxx */ + /* BKPT 1011 1110 xxxx xxxx */ + /* And unallocated instructions... */ DECODE_END }; -- cgit v1.2.3