]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: kprobes: Reject 32-bit Thumb coprocessor and SIMD instructions
authorJon Medhurst <tixy@yxit.co.uk>
Sun, 3 Jul 2011 13:57:18 +0000 (14:57 +0100)
committerTixy <tixy@medhuaa1.miniserver.com>
Wed, 13 Jul 2011 17:32:47 +0000 (17:32 +0000)
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>
arch/arm/kernel/kprobes-thumb.c

index 1677234000b2a11c4d7759eaf6530703e6004431..6cc51b48762f9dbc1d2a78f62d06f9cecbc82fe6 100644 (file)
@@ -509,6 +509,12 @@ const union decode_item kprobe_decode_thumb32_table[] = {
         */
        DECODE_TABLE    (0xfe000000, 0xea000000, t32_table_1110_101x),
 
+       /*
+        * Coprocessor instructions
+        *                      1110 11xx xxxx xxxx xxxx xxxx xxxx xxxx
+        */
+       DECODE_REJECT   (0xfc000000, 0xec000000),
+
        /*
         * Data-processing (modified immediate)
         *                      1111 0x0x xxxx xxxx 0xxx xxxx xxxx xxxx
@@ -527,6 +533,16 @@ const union decode_item kprobe_decode_thumb32_table[] = {
         */
        DECODE_TABLE    (0xf8008000, 0xf0008000, t32_table_1111_0xxx___1),
 
+       /*
+        * Advanced SIMD element or structure load/store instructions
+        *                      1111 1001 xxx0 xxxx xxxx xxxx xxxx xxxx
+        */
+       DECODE_REJECT   (0xff100000, 0xf9000000),
+
+       /*
+        * Coprocessor instructions
+        *                      1111 11xx xxxx xxxx xxxx xxxx xxxx xxxx
+        */
        DECODE_END
 };