aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Medhurst <tixy@yxit.co.uk>2011-07-03 09:57:18 -0400
committerTixy <tixy@medhuaa1.miniserver.com>2011-07-13 13:32:47 -0400
commit6a0d1a1c5692d6192684fb7aa8f4d7f401f8dbab (patch)
tree3f0c36ecbce036b753f2c191c8907a79c3c9fd37
parentce715c772f0124f9d3f6f5cffcb85688c81d2c07 (diff)
ARM: kprobes: Reject 32-bit Thumb coprocessor and SIMD instructions
The kernel doesn't currently support VFP or Neon code, and probing of code with CP15 operations is fraught with bad consequences. So we will just reject probing these instructions. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
-rw-r--r--arch/arm/kernel/kprobes-thumb.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/kernel/kprobes-thumb.c
index 1677234000b2..6cc51b48762f 100644
--- a/arch/arm/kernel/kprobes-thumb.c
+++ b/arch/arm/kernel/kprobes-thumb.c
@@ -510,6 +510,12 @@ const union decode_item kprobe_decode_thumb32_table[] = {
510 DECODE_TABLE (0xfe000000, 0xea000000, t32_table_1110_101x), 510 DECODE_TABLE (0xfe000000, 0xea000000, t32_table_1110_101x),
511 511
512 /* 512 /*
513 * Coprocessor instructions
514 * 1110 11xx xxxx xxxx xxxx xxxx xxxx xxxx
515 */
516 DECODE_REJECT (0xfc000000, 0xec000000),
517
518 /*
513 * Data-processing (modified immediate) 519 * Data-processing (modified immediate)
514 * 1111 0x0x xxxx xxxx 0xxx xxxx xxxx xxxx 520 * 1111 0x0x xxxx xxxx 0xxx xxxx xxxx xxxx
515 */ 521 */
@@ -527,6 +533,16 @@ const union decode_item kprobe_decode_thumb32_table[] = {
527 */ 533 */
528 DECODE_TABLE (0xf8008000, 0xf0008000, t32_table_1111_0xxx___1), 534 DECODE_TABLE (0xf8008000, 0xf0008000, t32_table_1111_0xxx___1),
529 535
536 /*
537 * Advanced SIMD element or structure load/store instructions
538 * 1111 1001 xxx0 xxxx xxxx xxxx xxxx xxxx
539 */
540 DECODE_REJECT (0xff100000, 0xf9000000),
541
542 /*
543 * Coprocessor instructions
544 * 1111 11xx xxxx xxxx xxxx xxxx xxxx xxxx
545 */
530 DECODE_END 546 DECODE_END
531}; 547};
532 548