lkml.org 
[lkml]   [2017]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 12/28] x86/insn-eval: Add utility functions to get segment selector
From
Date
On Fri, 2017-09-29 at 13:56 +0200, Borislav Petkov wrote:
> On Thu, Sep 28, 2017 at 11:06:42PM -0700, Ricardo Neri wrote:
> >
> > I agree. In fact, insn_get_seg_base() does not need insn at all. All it
> > needs is
> > a INAT_SEG_REG_* index. This would make things clear. UMIP (and callers that
> > need to copy_from_user code can do insn_get_seg_base(regs, INAT_SEG_REG_CS).
> > No
> > insn needed.
> Yap.
>
> >
> > In fact, it is only the insn_get_addr_ref_xx() family of functions that does
> I think you mean get_addr_ref_xx() here.

Yes.

>
> >
> > Do you think the pseudocode above addresses your concerns?
> >
> > *insn_get_seg_base() will take a INAT_SEG_REG_* index
> > *insn_get_ref_xx() receives an initialized insn that can check for NULL
> > value.
> > *a reworked resolve_seg_reg_idx will clearly check if it can use segment
> > override prefixes and obtain them. If not, it will use default values.
> Makes sense, but send me the final version to take a look at it too.

I just sent a v9 with all these changes as they impacted several patches in the
series.

Thanks and BR,
Ricardo

\
 
 \ /
  Last update: 2017-10-04 18:50    [W:0.082 / U:5.044 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site