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, 07 Oct 2022 10:47:55 -0700
From:   "H. Peter Anvin" <hpa@...or.com>
To:     Peter Zijlstra <peterz@...radead.org>, Xin Li <xin3.li@...el.com>
CC:     linux-kernel@...r.kernel.org, x86@...nel.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com
Subject: Re: [PATCH 4/6] x86/gsseg: move local_irq_save/restore() into asm_load_gs_index()

On October 7, 2022 7:50:01 AM PDT, Peter Zijlstra <peterz@...radead.org> wrote:
>On Thu, Oct 06, 2022 at 08:40:39AM -0700, Xin Li wrote:
>>  SYM_FUNC_START(asm_load_gs_index)
>>  	FRAME_BEGIN
>> +	pushf
>> +	pop	%rax
>> +	andl	$X86_EFLAGS_IF, %eax	/* Interrupts enabled? */
>> +	jz	1f
>> +	cli
>> +1:
>
>Why the pop,andl,jz ? AFAICT our arch_local_irq_save() doesn't even
>bother with that, why does this function.

They pop and and are needed for the sti anyway, and so might as well be leveraged here, too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ