diff options
| author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-02 04:22:21 -0400 |
|---|---|---|
| committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-09-30 07:04:38 -0400 |
| commit | 742343551165f314c740a41b070d0fc7fbe202f7 (patch) | |
| tree | 4ef1ff8c2561438ecdde87b9bf0944d80914f0e3 | |
| parent | 8f0ba630af45235a6866054704531d49e524e49a (diff) | |
s390/kprobes: add exrl to list of prohibited opcodes
"execute relative long" may have all sorts of side effects dependend on
the instructions it executes.
Therefore prohibit setting a kprobe on exrl just like we do for the
regular execute instruction.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| -rw-r--r-- | arch/s390/kernel/kprobes.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 0ce9fb245034..d86e64eddb42 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
| @@ -67,6 +67,11 @@ static int __kprobes is_prohibited_opcode(kprobe_opcode_t *insn) | |||
| 67 | case 0xac: /* stnsm */ | 67 | case 0xac: /* stnsm */ |
| 68 | case 0xad: /* stosm */ | 68 | case 0xad: /* stosm */ |
| 69 | return -EINVAL; | 69 | return -EINVAL; |
| 70 | case 0xc6: | ||
| 71 | switch (insn[0] & 0x0f) { | ||
| 72 | case 0x00: /* exrl */ | ||
| 73 | return -EINVAL; | ||
| 74 | } | ||
| 70 | } | 75 | } |
| 71 | switch (insn[0]) { | 76 | switch (insn[0]) { |
| 72 | case 0x0101: /* pr */ | 77 | case 0x0101: /* pr */ |
| @@ -180,7 +185,6 @@ static int __kprobes is_insn_relative_long(kprobe_opcode_t *insn) | |||
| 180 | break; | 185 | break; |
| 181 | case 0xc6: | 186 | case 0xc6: |
| 182 | switch (insn[0] & 0x0f) { | 187 | switch (insn[0] & 0x0f) { |
| 183 | case 0x00: /* exrl */ | ||
| 184 | case 0x02: /* pfdrl */ | 188 | case 0x02: /* pfdrl */ |
| 185 | case 0x04: /* cghrl */ | 189 | case 0x04: /* cghrl */ |
| 186 | case 0x05: /* chrl */ | 190 | case 0x05: /* chrl */ |
