diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-13 14:14:10 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-24 17:16:50 +0200 |
commit | 1ffa11abfe90320abe82bf5bb7eeca154e333058 (patch) | |
tree | 4bd80efa5b44e470471a78698ac736fab6867644 /arch/s390/include | |
parent | a882b3b0676fa42ab29c492e56749ab00ca95c0d (diff) | |
download | linux-1ffa11abfe90320abe82bf5bb7eeca154e333058.tar.gz linux-1ffa11abfe90320abe82bf5bb7eeca154e333058.tar.bz2 linux-1ffa11abfe90320abe82bf5bb7eeca154e333058.zip |
s390/kprobes: allow kprobes only on known instructions
Since we have an in-kernel disassembler we can make sure that
there won't be any kprobes set on random data.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/dis.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/include/asm/dis.h b/arch/s390/include/asm/dis.h index 4d0dffc68221..04a83f5773cd 100644 --- a/arch/s390/include/asm/dis.h +++ b/arch/s390/include/asm/dis.h @@ -42,5 +42,11 @@ static inline int insn_length(unsigned char code) void show_code(struct pt_regs *regs); void print_fn_code(unsigned char *code, unsigned long len); int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len); +struct s390_insn *find_insn(unsigned char *code); + +static inline int is_known_insn(unsigned char *code) +{ + return !!find_insn(code); +} #endif /* __ASM_S390_DIS_H__ */ |