[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <73120bb4-7eae-49e7-be50-1fac67d351c2@app.fastmail.com>
Date: Thu, 22 May 2025 14:24:32 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "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>
Subject: Re: [PATCH 3/3] [RFC] x86/devmem: remove low 1MB hack for x86-64
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?
--- a/arch/x86/kernel/probe_roms.c
+++ b/arch/x86/kernel/probe_roms.c
@@ -27,7 +27,7 @@ static struct resource system_rom_resource = {
.name = "System ROM",
.start = 0xf0000,
.end = 0xfffff,
- .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
+ .flags = IORESOURCE_READONLY | IORESOURCE_MEM
};
static struct resource extension_rom_resource = {
> I would be interested to see though, so:
>
> Acked-by: Dan Williams <dan.j.williams@...el.com>
Thanks,
ARnd
Powered by blists - more mailing lists