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:   Wed, 12 Jul 2017 17:36:30 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Matthias Kaehlcke <mka@...omium.org>
Cc:     Chris J Arges <chris.j.arges@...onical.com>,
        Borislav Petkov <bp@...e.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org,
        Douglas Anderson <dianders@...omium.org>,
        Michael Davidson <md@...gle.com>,
        Greg Hackmann <ghackmann@...gle.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Stephen Hines <srhines@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Arnd Bergmann <arnd@...db.de>, Bernhard.Rosenkranzer@...aro.org
Subject: Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in
 get_user() inline asm"

On Wed, Jul 12, 2017 at 05:35:47PM -0500, Josh Poimboeuf wrote:
> On Wed, Jul 12, 2017 at 03:20:40PM -0700, Matthias Kaehlcke wrote:
> > > This is admittedly an awkward way of achieving this goal, but it's the
> > > only way I know how to do it with GCC.
> > > 
> > > What extra instruction does clang add?
> > 
> > I was looking at the get_user() call in drm_mode_setcrtc(). The code
> > generated by clang without the patch is:
> > 
> >                         if (get_user(out_id, &set_connectors_ptr[i])) {
> > ffffffff81386955:       4a 8d 04 bd 00 00 00    lea    0x0(,%r15,4),%rax
> > ffffffff8138695c:       00 
> > ffffffff8138695d:       49 03 06                add    (%r14),%rax
> > ffffffff81386960:       e8 2b a5 f0 ff          callq  ffffffff81290e90 <__get_user_4>
> > 
> > And with the patch:
> > 
> >                         if (get_user(out_id, &set_connectors_ptr[i])) {
> > ffffffff81386a56:       4a 8d 04 bd 00 00 00    lea    0x0(,%r15,4),%rax
> > ffffffff81386a5d:       00 
> > ffffffff81386a5e:       49 03 06                add    (%r14),%rax
> > ffffffff81386a61:       48 8b 64 24 28          mov    0x28(%rsp),%rsp
> > ffffffff81386a66:       e8 15 a5 f0 ff          callq
> > ffffffff81290f80 <__get_user_4>
> 
> Hm, that seems odd.  Can you sure the disassembly for the whole
> function?

Er, share :-)

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ