diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-05-26 17:26:20 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-05-26 17:26:29 -0400 |
commit | bac9f154acd175afdf702cb7d7f5de1254b4b119 (patch) | |
tree | 46a9dc8dc42336842fa9410504e5b07b00173ad2 /arch/s390/kernel/kprobes.c | |
parent | 215b3096371907e5d866bb219be7ef3d5ce6c083 (diff) |
[S390] kprobes: forbid probing of stnsm/stosm/epsw
The probed instructions will be executed in a single stepped and irq
disabled context. Therefore the results of stnsm, stosm and epsw would
be wrong if probed.
So let's just disallow probing of these functions. If really needed a
fixup could be written for each of them, but I doubt it's worth it.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/kprobes.c')
-rw-r--r-- | arch/s390/kernel/kprobes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 3d34eef5a2c3..2a3d2bf6f083 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
@@ -63,6 +63,8 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction) | |||
63 | case 0x0b: /* bsm */ | 63 | case 0x0b: /* bsm */ |
64 | case 0x83: /* diag */ | 64 | case 0x83: /* diag */ |
65 | case 0x44: /* ex */ | 65 | case 0x44: /* ex */ |
66 | case 0xac: /* stnsm */ | ||
67 | case 0xad: /* stosm */ | ||
66 | return -EINVAL; | 68 | return -EINVAL; |
67 | } | 69 | } |
68 | switch (*(__u16 *) instruction) { | 70 | switch (*(__u16 *) instruction) { |
@@ -72,6 +74,7 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction) | |||
72 | case 0xb258: /* bsg */ | 74 | case 0xb258: /* bsg */ |
73 | case 0xb218: /* pc */ | 75 | case 0xb218: /* pc */ |
74 | case 0xb228: /* pt */ | 76 | case 0xb228: /* pt */ |
77 | case 0xb98d: /* epsw */ | ||
75 | return -EINVAL; | 78 | return -EINVAL; |
76 | } | 79 | } |
77 | return 0; | 80 | return 0; |