x86/insn: Add insn_get_modrm_reg_off()
authorJoerg Roedel <jroedel@suse.de>
Mon, 7 Sep 2020 13:15:11 +0000 (15:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Sep 2020 17:45:24 +0000 (19:45 +0200)
commit7af1bd822dd45a669fc178a35cc8183922333d56
tree616542d0ee1299c7b4a0c79b80b5fdf5810399e5
parent172639d79977ca7b5ce6f84f6606262f4081718f
x86/insn: Add insn_get_modrm_reg_off()

Add a function to the instruction decoder which returns the pt_regs
offset of the register specified in the reg field of the modrm byte.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lkml.kernel.org/r/20200907131613.12703-11-joro@8bytes.org
arch/x86/include/asm/insn-eval.h
arch/x86/lib/insn-eval.c