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: <20230105202324.GA1165237@bhelgaas>
Date:   Thu, 5 Jan 2023 14:23:24 -0600
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     "Luck, Tony" <tony.luck@...el.com>,
        "Liang, Kan" <kan.liang@...ux.intel.com>,
        "bhelgaas@...gle.com" <bhelgaas@...gle.com>,
        "hdegoede@...hat.com" <hdegoede@...hat.com>,
        "kernelorg@...ead.fr" <kernelorg@...ead.fr>,
        "kjhambrick@...il.com" <kjhambrick@...il.com>,
        "2lprbe78@...k.com" <2lprbe78@...k.com>,
        "nicholas.johnson-opensource@...look.com.au" 
        <nicholas.johnson-opensource@...look.com.au>,
        "benoitg@...us.ca" <benoitg@...us.ca>,
        "mika.westerberg@...ux.intel.com" <mika.westerberg@...ux.intel.com>,
        "wse@...edocomputers.com" <wse@...edocomputers.com>,
        "mumblingdrunkard@...tonmail.com" <mumblingdrunkard@...tonmail.com>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Box, David E" <david.e.box@...el.com>,
        "Sun, Yunying" <yunying.sun@...el.com>
Subject: Re: Bug report: the extended PCI config space is missed with 6.2-rc2

On Thu, Jan 05, 2023 at 11:44:28AM -0800, Dan Williams wrote:
> Bjorn Helgaas wrote:

> > Apparently the only mention of [mem 0x80000000-0x8fffffff] in the
> > firmware/kernel interface is as an EfiMemoryMappedIO region.
> > 
> > I think this is a firmware bug, but obviously we're going to have to
> > figure out a way around it.
> 
> Definitely an ambiguity / conflict, but not sure it is a bug when you
> look at from the perspective of how would an EFI runtime service use
> ECAM/MMCONFIG space? 

I think it's perfectly fine for firmware to advertise ECAM space as an
EfiMemoryMappedIO region via EFI GetMemoryMap() because it certainly
makes sense that EFI runtime services would use config space.

My understanding is that the OS should learn about device address
space via ACPI _CRS, not GetMemoryMap().  The MCFG spec (PCI Firmware
Spec, r3.3, sec 4.1.2) requires ECAM space to be reserved via a
PNP0C02 motherboard device _CRS.

So what I think *is* a bug is that this firmware doesn't report the
ECAM space via PNP0C02 _CRS.

If somebody thinks the lack of this reservation is not a bug, I would
love to hear ideas about how Linux *should* be handling this.  There
are many variations on how firmware does things like this, and it's
been a nightmare trying to figure out something that works with all of
them.

> Would it be enough to add this clarification in "EFI 2.9 Table 7-6
> Memory Type Usage after ExitBootServices()"?
> 
> s/This memory is not used by the OS./This memory is not used by the OS,
> unless ACPI declares it for another purpose./

I guess the idea is that MCFG is a form of "ACPI declaring it"?  I
don't have an explicit citation for it, but I infer at [1] that ACPI
static tables are second-class citizens and not intended as a way of
reserving address space because that would lead to problems booting
old OSes on firmware that provides new tables unknown to the OS.

Bjorn

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/PCI/acpi-info.rst?id=v6.1#n32

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ