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


Groups > linux.kernel > #1636512

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

From Borislav Petkov <bp@suse.de>
Newsgroups linux.kernel
Subject Re: [v6 PATCH 08/21] x86/insn-eval: Add utility function to get segment descriptor base address
Date 2017-05-05 19:40 +0200
Message-ID <tDPmW-4Oe-11@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> <tAE4F-mI-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 26, 2017 at 03:52:41PM -0700, Ricardo Neri wrote:
> 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.

... and depending on whether in long mode or not.

> 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.

... or you can look at the insn opcode directly. AFAICT, you need
to check whether the opcode is 0xa4 or 0xa5 and that the insn is a
single-byte opcode, i.e., not from the secondary map escaped with 0xf or
some of the other multi-byte opcode maps.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

Back to linux.kernel | Previous | NextPrevious 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