[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <cac58a25-eda6-4738-966f-a4e42818aa6c@app.fastmail.com>
Date: Fri, 31 Oct 2025 10:38:02 -0700
From: "Andy Lutomirski" <luto@...nel.org>
To: "Dave Hansen" <dave.hansen@...el.com>,
"Sohil Mehta" <sohil.mehta@...el.com>,
"the arch/x86 maintainers" <x86@...nel.org>,
"Dave Hansen" <dave.hansen@...ux.intel.com>,
"Thomas Gleixner" <tglx@...utronix.de>, "Ingo Molnar" <mingo@...hat.com>,
"Borislav Petkov" <bp@...en8.de>
Cc: "Jonathan Corbet" <corbet@....net>, "H. Peter Anvin" <hpa@...or.com>,
"Josh Poimboeuf" <jpoimboe@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
"Ard Biesheuvel" <ardb@...nel.org>, "Kirill A . Shutemov" <kas@...nel.org>,
"Xin Li" <xin@...or.com>, "David Woodhouse" <dwmw@...zon.co.uk>,
"Sean Christopherson" <seanjc@...gle.com>,
"Rick P Edgecombe" <rick.p.edgecombe@...el.com>,
"Vegard Nossum" <vegard.nossum@...cle.com>,
"Andrew Cooper" <andrew.cooper3@...rix.com>,
"Randy Dunlap" <rdunlap@...radead.org>,
"Geert Uytterhoeven" <geert@...ux-m68k.org>, "Kees Cook" <kees@...nel.org>,
"Tony Luck" <tony.luck@...el.com>,
"Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
linux-doc@...r.kernel.org,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
linux-efi@...r.kernel.org
Subject: Re: [PATCH v11 5/9] x86/efi: Disable LASS while mapping the EFI runtime
services
On Fri, Oct 31, 2025, at 10:11 AM, Dave Hansen wrote:
> On 10/29/25 14:03, Sohil Mehta wrote:
>> From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
>>
>> While mapping EFI runtime services, set_virtual_address_map() is called
>> at its lower mapping, which LASS prohibits. Wrapping the EFI call with
>> lass_disable()/_enable() is not enough, because the AC flag only
>> controls data accesses, and not instruction fetches.
>>
>> Use the big hammer and toggle the CR4.LASS bit to make this work.
>
> One thing that's actually missing here is an explanation on how it's OK
> to munge CR bits here. Why are preemption and interrupts not a problem?
>
> A reviewer would have to go off and figure this out on their own.
I have another question: why is this one specific call a problem as opposed to something more general? Wouldn’t any EFI call that touches the low EFI mapping be a problem? Are there any odd code paths that touch low mapped EFI *data* that would fault?
Am I imagining an issue that doesn’t exist? Is there some way to be reasonably convinced that you haven’t missed another EFI code path? Would it be ridiculous to defer enabling LASS until we’re almost ready to run user code?
Powered by blists - more mailing lists