diff options
author | Joerg Roedel <jroedel@suse.de> | 2020-09-07 15:15:12 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-09-07 19:45:25 +0200 |
commit | 5901781a11175a5e5ee91746ec8627f18d47eebd (patch) | |
tree | 0db5b70b8a19c0e47e46f485d971175dac5f6aaf /arch/x86/include/asm/insn-eval.h | |
parent | 7af1bd822dd45a669fc178a35cc8183922333d56 (diff) | |
download | linux-5901781a11175a5e5ee91746ec8627f18d47eebd.tar.bz2 |
x86/insn: Add insn_has_rep_prefix() helper
Add a function to check whether an instruction has a REP prefix.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lkml.kernel.org/r/20200907131613.12703-12-joro@8bytes.org
Diffstat (limited to 'arch/x86/include/asm/insn-eval.h')
-rw-r--r-- | arch/x86/include/asm/insn-eval.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/insn-eval.h b/arch/x86/include/asm/insn-eval.h index f748f57f1491..a0f839aa144d 100644 --- a/arch/x86/include/asm/insn-eval.h +++ b/arch/x86/include/asm/insn-eval.h @@ -15,6 +15,7 @@ #define INSN_CODE_SEG_OPND_SZ(params) (params & 0xf) #define INSN_CODE_SEG_PARAMS(oper_sz, addr_sz) (oper_sz | (addr_sz << 4)) +bool insn_has_rep_prefix(struct insn *insn); void __user *insn_get_addr_ref(struct insn *insn, struct pt_regs *regs); int insn_get_modrm_rm_off(struct insn *insn, struct pt_regs *regs); int insn_get_modrm_reg_off(struct insn *insn, struct pt_regs *regs); |