diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-06-11 10:16:41 -0400 |
---|---|---|
committer | Tixy <tixy@medhuaa1.miniserver.com> | 2011-07-13 13:32:51 -0400 |
commit | 465f1ea595a5040d8b9563e75e0b571a0bacb733 (patch) | |
tree | 067ff071634865a82de6d973d24455a5ae2ab59e | |
parent | 711bf10633485e0489fec0fc35abee240dd619ae (diff) |
ARM: kprobes: Reject probing of unprivileged load and store instructions
These occur extremely rarely in the kernel and writing test cases for
them is difficult.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
-rw-r--r-- | arch/arm/kernel/kprobes-arm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-arm.c b/arch/arm/kernel/kprobes-arm.c index 1ee38adeb82d..70e540b7c53b 100644 --- a/arch/arm/kernel/kprobes-arm.c +++ b/arch/arm/kernel/kprobes-arm.c | |||
@@ -1262,6 +1262,13 @@ static const union decode_item arm_cccc_0001_____1001_table[] = { | |||
1262 | static const union decode_item arm_cccc_000x_____1xx1_table[] = { | 1262 | static const union decode_item arm_cccc_000x_____1xx1_table[] = { |
1263 | /* Extra load/store instructions */ | 1263 | /* Extra load/store instructions */ |
1264 | 1264 | ||
1265 | /* STRHT cccc 0000 xx10 xxxx xxxx xxxx 1011 xxxx */ | ||
1266 | /* ??? cccc 0000 xx10 xxxx xxxx xxxx 11x1 xxxx */ | ||
1267 | /* LDRHT cccc 0000 xx11 xxxx xxxx xxxx 1011 xxxx */ | ||
1268 | /* LDRSBT cccc 0000 xx11 xxxx xxxx xxxx 1101 xxxx */ | ||
1269 | /* LDRSHT cccc 0000 xx11 xxxx xxxx xxxx 1111 xxxx */ | ||
1270 | DECODE_REJECT (0x0f200090, 0x00200090), | ||
1271 | |||
1265 | /* LDRD/STRD lr,pc,{... cccc 000x x0x0 xxxx 111x xxxx 1101 xxxx */ | 1272 | /* LDRD/STRD lr,pc,{... cccc 000x x0x0 xxxx 111x xxxx 1101 xxxx */ |
1266 | DECODE_REJECT (0x0e10e0d0, 0x0000e0d0), | 1273 | DECODE_REJECT (0x0e10e0d0, 0x0000e0d0), |
1267 | 1274 | ||
@@ -1564,6 +1571,12 @@ static const union decode_item arm_cccc_01xx_table[] = { | |||
1564 | /* LDRB/STRB pc,[...] cccc 01xx x0xx xxxx xxxx xxxx xxxx xxxx */ | 1571 | /* LDRB/STRB pc,[...] cccc 01xx x0xx xxxx xxxx xxxx xxxx xxxx */ |
1565 | DECODE_REJECT (0x0c40f000, 0x0440f000), | 1572 | DECODE_REJECT (0x0c40f000, 0x0440f000), |
1566 | 1573 | ||
1574 | /* STRT cccc 01x0 x010 xxxx xxxx xxxx xxxx xxxx */ | ||
1575 | /* LDRT cccc 01x0 x011 xxxx xxxx xxxx xxxx xxxx */ | ||
1576 | /* STRBT cccc 01x0 x110 xxxx xxxx xxxx xxxx xxxx */ | ||
1577 | /* LDRBT cccc 01x0 x111 xxxx xxxx xxxx xxxx xxxx */ | ||
1578 | DECODE_REJECT (0x0d200000, 0x04200000), | ||
1579 | |||
1567 | /* STR (immediate) cccc 010x x0x0 xxxx xxxx xxxx xxxx xxxx */ | 1580 | /* STR (immediate) cccc 010x x0x0 xxxx xxxx xxxx xxxx xxxx */ |
1568 | /* STRB (immediate) cccc 010x x1x0 xxxx xxxx xxxx xxxx xxxx */ | 1581 | /* STRB (immediate) cccc 010x x1x0 xxxx xxxx xxxx xxxx xxxx */ |
1569 | DECODE_EMULATEX (0x0e100000, 0x04000000, emulate_str, | 1582 | DECODE_EMULATEX (0x0e100000, 0x04000000, emulate_str, |