Re: [v6 PATCH 06/21] x86/insn-eval: Add utility functions to get segment selector

2017-05-05 Thread Ricardo Neri
On Sun, 2017-04-30 at 19:15 +0200, Borislav Petkov wrote: > On Wed, Apr 26, 2017 at 01:44:43PM -0700, Ricardo Neri wrote: > > I regard that the role of this function is to obtain the the segment > > selector from either of the prefixes or inferred from the operands. It > > is the role of caller to

Re: [v6 PATCH 06/21] x86/insn-eval: Add utility functions to get segment selector

2017-04-30 Thread Borislav Petkov
On Wed, Apr 26, 2017 at 01:44:43PM -0700, Ricardo Neri wrote: > I regard that the role of this function is to obtain the the segment > selector from either of the prefixes or inferred from the operands. It > is the role of caller to determine if the segment selector should be > ignored. No, this i

Re: [v6 PATCH 06/21] x86/insn-eval: Add utility functions to get segment selector

2017-04-26 Thread Ricardo Neri
On Wed, 2017-04-26 at 13:44 -0700, Ricardo Neri wrote: > > > > > +*/ > > > + for (i = 0; i < insn->prefixes.nbytes; i++) { > > > + switch (insn->prefixes.bytes[i]) { > > > + case SEG_CS: > > > + return SEG_CS; > > > + case SEG_SS: > > > +

Re: [v6 PATCH 06/21] x86/insn-eval: Add utility functions to get segment selector

2017-04-26 Thread Ricardo Neri
On Tue, 2017-04-18 at 11:42 +0200, Borislav Petkov wrote: > On Tue, Mar 07, 2017 at 04:32:39PM -0800, Ricardo Neri wrote: > > When computing a linear address and segmentation is used, we need to know > > the base address of the segment involved in the computation. In most of > > the cases, the segm

Re: [v6 PATCH 06/21] x86/insn-eval: Add utility functions to get segment selector

2017-04-18 Thread Borislav Petkov
On Tue, Mar 07, 2017 at 04:32:39PM -0800, Ricardo Neri wrote: > When computing a linear address and segmentation is used, we need to know > the base address of the segment involved in the computation. In most of > the cases, the segment base address will be zero as in USER_DS/USER32_DS. > However,

[v6 PATCH 06/21] x86/insn-eval: Add utility functions to get segment selector

2017-03-07 Thread Ricardo Neri
When computing a linear address and segmentation is used, we need to know the base address of the segment involved in the computation. In most of the cases, the segment base address will be zero as in USER_DS/USER32_DS. However, it may be possible that a user space program defines its own segments