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]
Message-ID: <CALCETrXDED1oX-xpBdVShu-d96M4dNZg6zcE05dZYRTD7wekUw@mail.gmail.com>
Date:	Wed, 7 Oct 2015 12:06:26 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Denys Vlasenko <dvlasenk@...hat.com>
Cc:	Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Brian Gerst <brgerst@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH v2 27/36] x86/entry/32: Re-implement SYSENTER using the
 new C path

On Wed, Oct 7, 2015 at 11:08 AM, Denys Vlasenko <dvlasenk@...hat.com> wrote:
> On 10/06/2015 02:48 AM, Andy Lutomirski wrote:
>> +
>> +/* Opportunistic SYSEXIT */
>> +     TRACE_IRQS_ON                   /* User mode traces as IRQs on. */
>> +     movl    PT_EIP(%esp), %edx      /* pt_regs->ip */
>> +     movl    PT_OLDESP(%esp), %ecx   /* pt_regs->sp */
>> +     popl    %ebx                    /* pt_regs->bx */
>> +     addl    $2*4, %esp              /* skip pt_regs->cx and pt_regs->dx */
>
> Here stack engine and ALUs operating on ESP conflict,
> potentially adding a stall both before and after ADD.
>
> It might be faster to just pop twice into an unused register, say,
>         popl    %eax
>         popl    %eax
>
>> +     popl    %esi                    /* pt_regs->si */
>> +     popl    %edi                    /* pt_regs->di */
>> +     popl    %ebp                    /* pt_regs->bp */
>> +     popl    %eax                    /* pt_regs->ax */
>>  1:   mov     PT_FS(%esp), %fs
>>       PTGS_TO_GS
>

I'll benchmark it and possibly add it at the end of the series.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ