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: <1417af11-44fc-e14c-9cfa-5938a18605e1@linux.intel.com>
Date:   Wed, 1 Nov 2017 15:58:43 -0700
From:   Dave Hansen <dave.hansen@...ux.intel.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        moritz.lipp@...k.tugraz.at, daniel.gruss@...k.tugraz.at,
        michael.schwarz@...k.tugraz.at, luto@...nel.org,
        torvalds@...ux-foundation.org, keescook@...gle.com,
        hughd@...gle.com, x86@...nel.org, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH 01/23] x86, kaiser: prepare assembly for entry/exit CR3
 switching

On 11/01/2017 02:01 PM, Thomas Gleixner wrote:
> On Tue, 31 Oct 2017, Dave Hansen wrote:
>>  
>> +	pushq	%rdi
>> +	SWITCH_TO_KERNEL_CR3 scratch_reg=%rdi
>> +	popq	%rdi
> 
> Can you please have a macro variant which does:
> 
>     SWITCH_TO_KERNEL_CR3_PUSH reg=%rdi
> 
> So the pushq/popq is inside the macro. This has two reasons:
> 
>    1) If KAISER=n the pointless pushq/popq go away
> 
>    2) We need a boottime switch for that stuff, so we better have all
>       related code in the various macros in order to patch it in/out.

After Boris's comments, these push/pops are totally unnecessary.  We
just delay the CR3 until after we stashed off pt_regs and are allowed to
clobber things.

> Also, please wrap these macros in #ifdef KAISER right away and provide the
> stubs as well. It does not make sense to have them in patch 7 when patch 1
> introduces them.

Will do.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ