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] [day] [month] [year] [list]
Date:	Wed, 17 Aug 2016 20:34:50 +0200
From:	Denys Vlasenko <dvlasenk@...hat.com>
To:	Christian König <christian.koenig@....com>,
	Ingo Molnar <mingo@...nel.org>,
	Andy Lutomirski <luto@...nel.org>,
	Dan Williams <dan.j.williams@...el.com>,
	Alex Deucher <alexander.deucher@....com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Vinod Koul <vinod.koul@...el.com>,
	Johannes Berg <johannes.berg@...el.com>,
	Sara Sharon <sara.sharon@...el.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	x86@...nel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: RFC: Petition Intel/AMD to add POPF_IF insn

On 08/17/2016 07:30 PM, Christian König wrote:
>> But in my measurements POPF is not fast even in the case where restored
>> flags are not changed at all:
>>
>>                 mov     $200*1000*1000, %eax
>>                 pushf
>>                 pop     %rbx
>>                 .balign 64
>> loop:           push    %rbx
>>                 popf
>>                 dec     %eax
>>                 jnz     loop
>>
>> # perf stat -r20 ./popf_1g
>>      4,929,012,093      cycles                    #    3.412 GHz                      ( +-  0.02% )
>>        835,721,371      instructions              #    0.17  insn per cycle           ( +-  0.02% )
>>        1.446185359 seconds time elapsed                                          ( +-  0.46% )
>>
>> If I replace POPF with a pop into an unused register, I get this:
>
> You are comparing apples and bananas here.

Yes, I know. Pop into a register here is basically free.
I'd also add a STI and measure how much it takes to
enable interrupts, but unfortunately STI throws a #GP
in CPL 3.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ