Re: [PATCH v9 15/29] x86/insn-eval: Add utility functions to get segment descriptor base address and limit

2017-10-12 Thread Borislav Petkov
On Wed, Oct 11, 2017 at 06:24:03PM -0700, Ricardo Neri wrote: > On the other hand, in long mode, hardware ignore all segment registers except > FS > and GS. Yap. > Hence, I guess I can remove the check in question. Thx. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jan

Re: [PATCH v9 15/29] x86/insn-eval: Add utility functions to get segment descriptor base address and limit

2017-10-11 Thread Ricardo Neri
On Wed, 2017-10-11 at 22:16 +0200, Borislav Petkov wrote: > On Wed, Oct 11, 2017 at 12:57:01PM -0700, Ricardo Neri wrote: > > > > This is meant to be an error case. In long mode, > > only INAT_SEG_REG_IGNORE/FS/GS > > are valid. All other indices are invalid. > > > > Perhaps we could return -EINV

Re: [PATCH v9 15/29] x86/insn-eval: Add utility functions to get segment descriptor base address and limit

2017-10-11 Thread Borislav Petkov
On Wed, Oct 11, 2017 at 12:57:01PM -0700, Ricardo Neri wrote: > This is meant to be an error case. In long mode, only  > INAT_SEG_REG_IGNORE/FS/GS > are valid. All other indices are invalid. > > Perhaps we could return -EINVAL instead? So, my question is, when are you ever going to have that case

Re: [PATCH v9 15/29] x86/insn-eval: Add utility functions to get segment descriptor base address and limit

2017-10-11 Thread Ricardo Neri
On Wed, 2017-10-11 at 17:15 +0200, Borislav Petkov wrote: > On Tue, Oct 03, 2017 at 08:54:18PM -0700, Ricardo Neri wrote: > > > > With segmentation, the base address of the segment is needed to compute a > > linear address. This base address is obtained from the applicable segment > > descriptor.

Re: [PATCH v9 15/29] x86/insn-eval: Add utility functions to get segment descriptor base address and limit

2017-10-11 Thread Borislav Petkov
On Tue, Oct 03, 2017 at 08:54:18PM -0700, Ricardo Neri wrote: > With segmentation, the base address of the segment is needed to compute a > linear address. This base address is obtained from the applicable segment > descriptor. Such segment descriptor is referenced from a segment selector. ... >

[PATCH v9 15/29] x86/insn-eval: Add utility functions to get segment descriptor base address and limit

2017-10-03 Thread Ricardo Neri
With segmentation, the base address of the segment is needed to compute a linear address. This base address is obtained from the applicable segment descriptor. Such segment descriptor is referenced from a segment selector. These new functions obtain the segment base and limit of the segment selecto