summaryrefslogtreecommitdiff
path: root/tools/arch
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2022-07-11 01:43:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-25 12:26:12 +0300
commit9a6471666b7387ba0af70d504fe1602cc3d3e5b2 (patch)
tree9cf821143b2e035e5caa4d0a2ca47063a4853caf /tools/arch
parentd9cd21911498a9b423e2bdf728b283e4507e968e (diff)
downloadlinux-9a6471666b7387ba0af70d504fe1602cc3d3e5b2.tar.xz
x86: Add insn_decode_kernel()
This was done by commit 52fa82c21f64e900a72437269a5cc9e0034b424e upstream, but this backport avoids changing all callers of the old decoder API. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/arch')
-rw-r--r--tools/arch/x86/include/asm/insn.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/arch/x86/include/asm/insn.h b/tools/arch/x86/include/asm/insn.h
index 621ab64a6d27..636ec02793a7 100644
--- a/tools/arch/x86/include/asm/insn.h
+++ b/tools/arch/x86/include/asm/insn.h
@@ -105,6 +105,8 @@ enum insn_mode {
extern int insn_decode(struct insn *insn, const void *kaddr, int buf_len, enum insn_mode m);
+#define insn_decode_kernel(_insn, _ptr) insn_decode((_insn), (_ptr), MAX_INSN_SIZE, INSN_MODE_KERN)
+
/* Attribute will be determined after getting ModRM (for opcode groups) */
static inline void insn_get_attribute(struct insn *insn)
{