Commit bac9f154 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

[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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 215b3096
...@@ -63,6 +63,8 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction) ...@@ -63,6 +63,8 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction)
case 0x0b: /* bsm */ case 0x0b: /* bsm */
case 0x83: /* diag */ case 0x83: /* diag */
case 0x44: /* ex */ case 0x44: /* ex */
case 0xac: /* stnsm */
case 0xad: /* stosm */
return -EINVAL; return -EINVAL;
} }
switch (*(__u16 *) instruction) { switch (*(__u16 *) instruction) {
...@@ -72,6 +74,7 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction) ...@@ -72,6 +74,7 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction)
case 0xb258: /* bsg */ case 0xb258: /* bsg */
case 0xb218: /* pc */ case 0xb218: /* pc */
case 0xb228: /* pt */ case 0xb228: /* pt */
case 0xb98d: /* epsw */
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment