// SPDX-License-Identifier: GPL-2.0 /* * Common helper functions for kprobes and uprobes * * Copyright IBM Corp. 2014 */ #include <linux/errno.h> #include <asm/kprobes.h> #include <asm/dis.h>
int probe_is_prohibited_opcode(u16 *insn) { if (!is_known_insn((unsigned char *)insn)) return -EINVAL; switch (insn[0] >> 8) { case 0x0c: /* bassm */ case 0x0b: /* bsm */ case 0x83: /* diag */ case 0x44: /* ex */ case 0xac: /* stnsm */ case 0xad: /* stosm */ return -EINVAL; case 0xc6: switch (insn[0] & 0x0f) { case 0x00: /* exrl */ return -EINVAL; } } switch (insn[0]) { case 0x0101: /* pr */ case 0xb25a: /* bsa */ case 0xb240: /* bakr */ case 0xb258: /* bsg */ case 0xb218: /* pc */ case 0xb228: /* pt */ case 0xb98d: /* epsw */ case 0xe560: /* tbegin */ case 0xe561: /* tbeginc */ case 0xb2f8: /* tend */ return -EINVAL; } return 0; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jan Willeke | 143 | 100.00% | 1 | 100.00% |
Total | 143 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jan Willeke | 284 | 100.00% | 1 | 100.00% |
Total | 284 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jan Willeke | 169 | 100.00% | 1 | 100.00% |
Total | 169 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jan Willeke | 603 | 99.34% | 2 | 50.00% |
Heiko Carstens | 3 | 0.49% | 1 | 25.00% |
Greg Kroah-Hartman | 1 | 0.16% | 1 | 25.00% |
Total | 607 | 100.00% | 4 | 100.00% |