lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 05 May 2017 11:31:40 -0700
From:   Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To:     Borislav Petkov <bp@...e.de>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Brian Gerst <brgerst@...il.com>,
        Chris Metcalf <cmetcalf@...lanox.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Huang Rui <ray.huang@....com>, Jiri Slaby <jslaby@...e.cz>,
        Jonathan Corbet <corbet@....net>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Chen Yucong <slaoub@...il.com>,
        Alexandre Julliard <julliard@...ehq.org>,
        Stas Sergeev <stsp@...t.ru>, Fenghua Yu <fenghua.yu@...el.com>,
        "Ravi V. Shankar" <ravi.v.shankar@...el.com>,
        Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
        x86@...nel.org, linux-msdos@...r.kernel.org, wine-devel@...ehq.org,
        Adam Buchbinder <adam.buchbinder@...il.com>,
        Colin Ian King <colin.king@...onical.com>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Qiaowei Ren <qiaowei.ren@...el.com>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Kees Cook <keescook@...omium.org>,
        Thomas Garnier <thgarnie@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>
Subject: Re: [v6 PATCH 06/21] x86/insn-eval: Add utility functions to get
 segment selector

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 determine if the segment selector should be
> > ignored.
> 
> No, this is wrong. The function is called resolve_seg_selector() and it
> gives you the segment selector. CS, DS, ES, and SS in 64-bit mode are
> treated as null segments and your function should return/signal exactly
> that, i.e, saying that those should be ignored in that case.
> 
> > I double-checked the latest version of the Intel Software Development
> > manual [2], in the table 3-5 in section 3.7.4 mentions that DS is
> > default segment for all data references, except string destinations. I
> > tested this code with the UMIP-protected instructions and whenever I use
> > %edi the default segment is %ds.
> 
> Yes, all correct. Except that we're adding a more-or-less generic x86
> insn decoder so we should make it so...
> 
> > Is this example valid? The documentation of MOVS specifies that it
> > always moves DS:(E)SI to ES:(E)DI.
> 
> ... that the decoder should do exactly that:
> 
> 	if (MOVS and rDI)
> 		return SEG_ES;
> 
> And you're handing in struct insn * so you can easily check which insn
> you're looking at.

I see. I have submitted v7 of the series and I have implemented all the
changes above. Now I am able to identify string instructions.

Thanks and BR,
Ricardo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ