On Fri, Aug 18, 2017 at 05:27:51PM -0700, Ricardo Neri wrote: > The function get_reg_offset() returns the offset to the register the > argument specifies as indicated in an enumeration of type offset. Callers > of this function would need the definition of such enumeration. This is > not needed. Instead, add helper functions for this purpose. These functions > are useful in cases when, for instance, the caller needs to decide whether > the operand is a register or a memory location by looking at the rm part > of the ModRM byte. As of now, this is the only helper function that is > needed. > > Cc: Dave Hansen <dave.han...@linux.intel.com> > Cc: Adam Buchbinder <adam.buchbin...@gmail.com> > Cc: Colin Ian King <colin.k...@canonical.com> > Cc: Lorenzo Stoakes <lstoa...@gmail.com> > Cc: Qiaowei Ren <qiaowei....@intel.com> > Cc: Arnaldo Carvalho de Melo <a...@redhat.com> > Cc: Masami Hiramatsu <mhira...@kernel.org> > Cc: Adrian Hunter <adrian.hun...@intel.com> > Cc: Kees Cook <keesc...@chromium.org> > Cc: Thomas Garnier <thgar...@google.com> > Cc: Peter Zijlstra <pet...@infradead.org> > Cc: Borislav Petkov <b...@suse.de> > Cc: Dmitry Vyukov <dvyu...@google.com> > Cc: Ravi V. Shankar <ravi.v.shan...@intel.com> > Cc: x...@kernel.org > Signed-off-by: Ricardo Neri <ricardo.neri-calde...@linux.intel.com> > --- > arch/x86/include/asm/insn-eval.h | 1 + > arch/x86/lib/insn-eval.c | 15 +++++++++++++++ > 2 files changed, 16 insertions(+)
Reviewed-by: Borislav Petkov <b...@suse.de> -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --