From: "Arnd Bergmann" <arnd@arndb.de>
To: "Dan Williams" <dan.j.williams@intel.com>,
"Arnd Bergmann" <arnd@kernel.org>,
"Dave Hansen" <dave.hansen@linux.intel.com>
Cc: "Andy Lutomirski" <luto@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
x86@kernel.org, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Nikolay Borisov" <nik.borisov@suse.com>,
linux-kernel@vger.kernel.org, "Kees Cook" <kees@kernel.org>
Subject: Re: [PATCH 3/3] [RFC] x86/devmem: remove low 1MB hack for x86-64
Date: Thu, 22 May 2025 14:24:32 +0200 [thread overview]
Message-ID: <73120bb4-7eae-49e7-be50-1fac67d351c2@app.fastmail.com> (raw)
In-Reply-To: <682e5029e88e0_1626e1008e@dwillia2-xfh.jf.intel.com.notmuch>
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@intel.com>
Thanks,
ARnd
next prev parent reply other threads:[~2025-05-22 12:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 15:20 [PATCH 1/3] x86/devmem: move range_is_allowed() to drivers/char/mem.c Arnd Bergmann
2025-05-20 15:20 ` [PATCH 2/3] x86/devmem: remove phys_mem_access_prot_allowed() Arnd Bergmann
2025-05-21 22:08 ` Dan Williams
2025-05-20 15:20 ` [PATCH 3/3] [RFC] x86/devmem: remove low 1MB hack for x86-64 Arnd Bergmann
2025-05-21 22:14 ` Dan Williams
2025-05-22 12:24 ` Arnd Bergmann [this message]
2025-06-03 18:18 ` Dan Williams
2025-06-03 19:25 ` Arnd Bergmann
2025-06-03 19:36 ` Dan Williams
2025-06-11 14:18 ` Naveen N Rao
2025-05-21 22:05 ` [PATCH 1/3] x86/devmem: move range_is_allowed() to drivers/char/mem.c Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73120bb4-7eae-49e7-be50-1fac67d351c2@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=nik.borisov@suse.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®