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-next>] [day] [month] [year] [list]
Message-ID: <20180816204506.GA21144@agluck-desk>
Date:   Thu, 16 Aug 2018 13:45:07 -0700
From:   "Luck, Tony" <tony.luck@...el.com>
To:     Bjorn Helgaas <bhelgaas@...gle.com>
Cc:     linux-kernel@...r.kernel.org,
        Jayachandran C <jchandra@...adcom.com>,
        Sinan Kaya <okaya@...eaurora.org>,
        Tomasz Nowicki <tn@...ihalf.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Arnd Bergmann <arnd@...db.de>,
        Boris Brezillon <boris.brezillon@...tlin.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>
Subject: how to fix acpi_pci_root_remap_iospace?

Bjorn,

Back in commit:

  0a70abb38062 ("PCI/ACPI: Support I/O resources when parsing host bridge resources")

we added acpi_pci_root_remap_iospace().  On ia64 this was a no-op because ia64
didn't define PCI_IOBASE, so the entire body of the function was skipped.

But in the current merge window commit:

  0bbf47eab469 ("ia64: use asm-generic/io.h")

ended up defining PCI_IOBASE for us, and now we die horribly
in early boot with:

  kernel BUG at lib/ioremap.c:72!


Is PCI_IOBASE the right thing to check for to decide whether
acpi_pci_root_remap_iospace() needs to do anything?

The ugly fix would be:


diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 7433035ded95..de06377de13b 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -741,7 +741,7 @@ static void acpi_pci_root_validate_resources(struct device *dev,
 static void acpi_pci_root_remap_iospace(struct fwnode_handle *fwnode,
 			struct resource_entry *entry)
 {
-#ifdef PCI_IOBASE
+#if defined(PCI_IOBASE) && !defined(CONFIG_IA64)
 	struct resource *res = entry->res;
 	resource_size_t cpu_addr = res->start;
 	resource_size_t pci_addr = cpu_addr - entry->offset;

or we can do some other juggling with defines to get the
same outcome.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ