Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732501

Re: [PATCH v8 10/28] x86/insn-eval: Add a utility function to get register offsets

From Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v8 10/28] x86/insn-eval: Add a utility function to get register offsets
Date 2017-09-14 20:40 +0200
Message-ID <upHdo-aN-11@gated-at.bofh.it> (permalink)
References <ufZOh-2z5-3@gated-at.bofh.it> <ufZOi-2z5-21@gated-at.bofh.it> <unrFL-7D6-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2017-09-08 at 15:35 +0200, Borislav Petkov wrote:
> 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.hansen@linux.intel.com>
> > Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
> > Cc: Colin Ian King <colin.king@canonical.com>
> > Cc: Lorenzo Stoakes <lstoakes@gmail.com>
> > Cc: Qiaowei Ren <qiaowei.ren@intel.com>
> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> > Cc: Masami Hiramatsu <mhiramat@kernel.org>
> > Cc: Adrian Hunter <adrian.hunter@intel.com>
> > Cc: Kees Cook <keescook@chromium.org>
> > Cc: Thomas Garnier <thgarnie@google.com>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Borislav Petkov <bp@suse.de>
> > Cc: Dmitry Vyukov <dvyukov@google.com>
> > Cc: Ravi V. Shankar <ravi.v.shankar@intel.com>
> > Cc: x86@kernel.org
> > Signed-off-by: Ricardo Neri <ricardo.neri-calderon@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 <bp@suse.de>

Thanks for your review!

BR,
Ricardo

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v8 10/28] x86/insn-eval: Add a utility function to get  register offsets Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2017-09-14 20:40 +0200

csiph-web