[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <683f3c91c033f_1626e10021@dwillia2-xfh.jf.intel.com.notmuch>
Date: Tue, 3 Jun 2025 11:18:57 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Arnd Bergmann <arnd@...db.de>, Dan Williams <dan.j.williams@...el.com>,
Arnd Bergmann <arnd@...nel.org>, Dave Hansen <dave.hansen@...ux.intel.com>
CC: Andy Lutomirski <luto@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, <x86@...nel.org>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Nikolay Borisov <nik.borisov@...e.com>,
<linux-kernel@...r.kernel.org>, Kees Cook <kees@...nel.org>, "Naveen N Rao
(AMD)" <naveen@...nel.org>
Subject: Re: [PATCH 3/3] [RFC] x86/devmem: remove low 1MB hack for x86-64
[add Naveen]
Arnd Bergmann wrote:
> On Thu, May 22, 2025, at 00:14, Dan Williams wrote:
> > Arnd Bergmann wrote:
> >>
> >> Unlike the other two patches in this series, this one is expected to
> >> change the behavior on x86-64 kernels, which has the risk of
> >> regressions, but seems worthwhile to me.
> >>
> >> Are there any reasons left for keeping these hacks?
> >
> > Kees did this search which seems to suggest that there is still code out
> > there that may not be prepared for a behavior change here:
> >
> > http://lore.kernel.org/202504101926.0F8FB73@keescook
> >
> > Maybe those paths fallback to dmi sysfs or other mechanisms for digging through
> > BIOS data, but I do not think we can know for sure that this removal is
> > regression free ahead of time.
>
> I looked at those three and from what I can tell, two attempt
> to access PCI BAR areas, which should not change with my patch:
> if they are busy or exclusive, they are already disallowed, otherwise
> they can still be mapped.
>
> The third one maps the BIOS area at 0xf0000, and as far as I can tell
> the hack explicitly allowed mapping that even though it is marked
> busy on x86-64 since 5d94e81f69d4 ("x86: Introduce pci_map_biosrom()").
>
> Is there any downside to marking this one non-busy and still allowing
> the ROM to be mapped? Would that bring back the issue of conflicting
> mapping flags between kernel and userspace?
For the confidential VM case I expect the answer is "yes" per this patch
attempt:
http://lore.kernel.org/20250403120228.2344377-1-naveen@kernel.org
Powered by blists - more mailing lists