diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-07-03 10:00:42 -0400 |
---|---|---|
committer | Tixy <tixy@medhuaa1.miniserver.com> | 2011-07-13 13:32:47 -0400 |
commit | 46009cc5c59e0acdf165ed8a9d1ccc43baf44800 (patch) | |
tree | c73015049440b01318f29bd74529dac1ed07d2cd | |
parent | 6a0d1a1c5692d6192684fb7aa8f4d7f401f8dbab (diff) |
ARM: kprobes: Decode 32-bit Thumb memory hint instructions
We'll treat the preload instructions as nops as they are just
performance hints.
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.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/kernel/kprobes-thumb.c index 6cc51b48762f..bf1113c89b15 100644 --- a/arch/arm/kernel/kprobes-thumb.c +++ b/arch/arm/kernel/kprobes-thumb.c | |||
@@ -489,6 +489,33 @@ static const union decode_item t32_table_1111_0xxx___1[] = { | |||
489 | DECODE_END | 489 | DECODE_END |
490 | }; | 490 | }; |
491 | 491 | ||
492 | static const union decode_item t32_table_1111_100x_x0x1__1111[] = { | ||
493 | /* Memory hints */ | ||
494 | |||
495 | /* PLD (literal) 1111 1000 x001 1111 1111 xxxx xxxx xxxx */ | ||
496 | /* PLI (literal) 1111 1001 x001 1111 1111 xxxx xxxx xxxx */ | ||
497 | DECODE_SIMULATE (0xfe7ff000, 0xf81ff000, kprobe_simulate_nop), | ||
498 | |||
499 | /* PLD{W} (immediate) 1111 1000 10x1 xxxx 1111 xxxx xxxx xxxx */ | ||
500 | DECODE_OR (0xffd0f000, 0xf890f000), | ||
501 | /* PLD{W} (immediate) 1111 1000 00x1 xxxx 1111 1100 xxxx xxxx */ | ||
502 | DECODE_OR (0xffd0ff00, 0xf810fc00), | ||
503 | /* PLI (immediate) 1111 1001 1001 xxxx 1111 xxxx xxxx xxxx */ | ||
504 | DECODE_OR (0xfff0f000, 0xf990f000), | ||
505 | /* PLI (immediate) 1111 1001 0001 xxxx 1111 1100 xxxx xxxx */ | ||
506 | DECODE_SIMULATEX(0xfff0ff00, 0xf910fc00, kprobe_simulate_nop, | ||
507 | REGS(NOPCX, 0, 0, 0, 0)), | ||
508 | |||
509 | /* PLD{W} (register) 1111 1000 00x1 xxxx 1111 0000 00xx xxxx */ | ||
510 | DECODE_OR (0xffd0ffc0, 0xf810f000), | ||
511 | /* PLI (register) 1111 1001 0001 xxxx 1111 0000 00xx xxxx */ | ||
512 | DECODE_SIMULATEX(0xfff0ffc0, 0xf910f000, kprobe_simulate_nop, | ||
513 | REGS(NOPCX, 0, 0, 0, NOSPPC)), | ||
514 | |||
515 | /* Other unallocated instructions... */ | ||
516 | DECODE_END | ||
517 | }; | ||
518 | |||
492 | const union decode_item kprobe_decode_thumb32_table[] = { | 519 | const union decode_item kprobe_decode_thumb32_table[] = { |
493 | 520 | ||
494 | /* | 521 | /* |
@@ -540,6 +567,12 @@ const union decode_item kprobe_decode_thumb32_table[] = { | |||
540 | DECODE_REJECT (0xff100000, 0xf9000000), | 567 | DECODE_REJECT (0xff100000, 0xf9000000), |
541 | 568 | ||
542 | /* | 569 | /* |
570 | * Memory hints | ||
571 | * 1111 100x x0x1 xxxx 1111 xxxx xxxx xxxx | ||
572 | */ | ||
573 | DECODE_TABLE (0xfe50f000, 0xf810f000, t32_table_1111_100x_x0x1__1111), | ||
574 | |||
575 | /* | ||
543 | * Coprocessor instructions | 576 | * Coprocessor instructions |
544 | * 1111 11xx xxxx xxxx xxxx xxxx xxxx xxxx | 577 | * 1111 11xx xxxx xxxx xxxx xxxx xxxx xxxx |
545 | */ | 578 | */ |