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: <28a98c27-7307-4698-9182-35e0d2cf12ad@intel.com>
Date: Tue, 17 Dec 2024 06:51:47 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
 David Woodhouse <dwmw2@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
 Eric Biederman <ebiederm@...ssion.com>, David Woodhouse <dwmw@...zon.co.uk>,
 Sourabh Jain <sourabhjain@...ux.ibm.com>,
 Hari Bathini <hbathini@...ux.ibm.com>, Michael Ellerman
 <mpe@...erman.id.au>, Thomas Zimmermann <tzimmermann@...e.de>,
 Andrew Morton <akpm@...ux-foundation.org>, Baoquan He <bhe@...hat.com>,
 Yuntao Wang <ytcoode@...il.com>, David Kaplan <david.kaplan@....com>,
 Tao Liu <ltao@...hat.com>, Kai Huang <kai.huang@...el.com>,
 Ard Biesheuvel <ardb@...nel.org>, Josh Poimboeuf <jpoimboe@...nel.org>,
 Breno Leitao <leitao@...ian.org>, Wei Yang <richard.weiyang@...il.com>,
 Rong Xu <xur@...gle.com>, Thomas Weißschuh
 <thomas.weissschuh@...utronix.de>, linux-kernel@...r.kernel.org,
 kexec@...ts.infradead.org, Simon Horman <horms@...nel.org>,
 Dave Young <dyoung@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
 bsz@...zon.de, nathan@...nel.org
Subject: Re: [PATCH 1/9] x86/kexec: Disable global pages before writing to
 control page

On 12/17/24 04:25, Kirill A. Shutemov wrote:
>> Clear the PGE bit in %cr4 early, before storing data in the control page.
> It worth noting that flipping CR4.PGE triggers TLB flush. I was not sure
> if CR3 write is required to make it happen.

I thought about removing the CR3 write. But I decided against it because
CR4.PGE needs to actually change value, unlike CR3 writes where any
write can flush the TLB (modulo globals, PCID and bit 63 of course).

X86_FEATURE_PGE itself is required but I couldn't actually remember if
there are any cases where CR4.PGE==0. If there were, the CR3 write would
still be needed. I don't _think_ there are any ways forx86_64 to end up
with CR4.PGE==0, but I also wouldn't out the possibility that some silly
issue pops up making us play stupid games and win stupid prizes.

Anyway, I think we can leave the belt-and-suspenders programming in this
case. A comment wouldn't hurt I guess.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ