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


Groups > linux.kernel > #1631783

Re: [v6 PATCH 08/21] x86/insn-eval: Add utility function to get segment descriptor base address

From Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [v6 PATCH 08/21] x86/insn-eval: Add utility function to get segment descriptor base address
Date 2017-04-27 01:00 +0200
Message-ID <tAE4F-mI-3@gated-at.bofh.it> (permalink)
References <tixO1-76a-3@gated-at.bofh.it> <tixO1-76a-9@gated-at.bofh.it> <tyfN9-6Do-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 2017-04-20 at 10:25 +0200, Borislav Petkov wrote:
> > + * insn_get_seg_base() - Obtain base address contained in
> descriptor
> > + * @regs:    Set of registers containing the segment selector
> > + * @insn:    Instruction structure with selector override prefixes
> > + * @regoff:  Operand offset, in pt_regs, of which the selector is
> needed
> > + * @use_default_seg: Use the default segment instead of prefix
> overrides
> 
> I'm wondering whether you really need that bool or you can deduce this
> from pt_regs... I guess I'll see...

Probably insn_get_seg_base() itself can verify if there are segment
override prefixes in the struct insn. If yes, use them except for
specific cases such as CS.

On an unrelated note, I still have the problem of using DS vs ES for
string instructions. Perhaps instead of a use_default_seg flag, a
string_instruction flag that indicates how to determine the default
segment.

Thanks and BR,
Ricardo

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [v6 PATCH 08/21] x86/insn-eval: Add utility function to get  segment descriptor base address Ricardo Neri <ricardo.neri-calderon@linux.intel.com> - 2017-04-27 01:00 +0200
  Re: [v6 PATCH 08/21] x86/insn-eval: Add utility function to get  segment descriptor base address Borislav Petkov <bp@suse.de> - 2017-05-05 19:40 +0200

csiph-web