From 444956677eccfcdfe05de761e1286f62c423ce88 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Sat, 2 Jul 2011 16:25:47 +0100 Subject: [PATCH] ARM: kprobes: Reject 16-bit Thumb SVC and UNDEFINED instructions SVC (SWI) instructions shouldn't occur in kernel code so we don't need to be able to probe them. Signed-off-by: Jon Medhurst Acked-by: Nicolas Pitre --- arch/arm/kernel/kprobes-thumb.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/kernel/kprobes-thumb.c index e496948fefac..997fc6d59a40 100644 --- a/arch/arm/kernel/kprobes-thumb.c +++ b/arch/arm/kernel/kprobes-thumb.c @@ -464,6 +464,14 @@ const union decode_item kprobe_decode_thumb16_table[] = { /* LDM 1100 1xxx xxxx xxxx */ DECODE_EMULATE (0xf000, 0xc000, t16_emulate_loregs_rwflags), + /* + * Conditional branch, and Supervisor Call + */ + + /* Permanently UNDEFINED 1101 1110 xxxx xxxx */ + /* SVC 1101 1111 xxxx xxxx */ + DECODE_REJECT (0xfe00, 0xde00), + DECODE_END };