Skip to content

Commit

Permalink
[S390] kprobes: forbid probing of stnsm/stosm/epsw
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed May 26, 2010
1 parent 215b309 commit bac9f15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/s390/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction)
case 0x0b: /* bsm */
case 0x83: /* diag */
case 0x44: /* ex */
case 0xac: /* stnsm */
case 0xad: /* stosm */
return -EINVAL;
}
switch (*(__u16 *) instruction) {
Expand All @@ -72,6 +74,7 @@ int __kprobes is_prohibited_opcode(kprobe_opcode_t *instruction)
case 0xb258: /* bsg */
case 0xb218: /* pc */
case 0xb228: /* pt */
case 0xb98d: /* epsw */
return -EINVAL;
}
return 0;
Expand Down

0 comments on commit bac9f15

Please sign in to comment.