Skip to content

Commit 7423435

Browse files
heicarstMartin Schwidefsky
authored andcommitted
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 <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 8f0ba63 commit 7423435

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/s390/kernel/kprobes.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ static int __kprobes is_prohibited_opcode(kprobe_opcode_t *insn)
6767
case 0xac: /* stnsm */
6868
case 0xad: /* stosm */
6969
return -EINVAL;
70+
case 0xc6:
71+
switch (insn[0] & 0x0f) {
72+
case 0x00: /* exrl */
73+
return -EINVAL;
74+
}
7075
}
7176
switch (insn[0]) {
7277
case 0x0101: /* pr */
@@ -180,7 +185,6 @@ static int __kprobes is_insn_relative_long(kprobe_opcode_t *insn)
180185
break;
181186
case 0xc6:
182187
switch (insn[0] & 0x0f) {
183-
case 0x00: /* exrl */
184188
case 0x02: /* pfdrl */
185189
case 0x04: /* cghrl */
186190
case 0x05: /* chrl */

0 commit comments

Comments
 (0)