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] [day] [month] [year] [list]
Message-ID: <20090617201727.GV19977@parisc-linux.org>
Date:	Wed, 17 Jun 2009 14:17:28 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Andrew Patterson <andrew.patterson@...com>,
	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	jbarnes@...tuousgeek.org
Subject: Re: [PATCH 0/1] Recurse when searching for empty slots in
	resources trees

On Wed, Jun 17, 2009 at 01:12:42PM -0700, Linus Torvalds wrote:
> On Wed, 17 Jun 2009, Andrew Patterson wrote:
> > > 
> > > This is why I'd really like to see the output of my test-patch. It would 
> > > show exactly _where_ that resource is inserted, and the whole call-chain.
> > > 
> > > I'm appending a version that only does it for resources that have names 
> > > starting with "PCI Bus", so it should be less noisy. But again, it's 
> > > totally untested.
> > > 
> > 
> > Here you go (I can provide the full boot log if needed). Note, there is
> > nothing for c3 here:
> 
> Ok, so that means it got inserted into the resource tree some other way 
> entirely. Or maybe the name got changed after-the-fact. Both of which 
> imply that something is really really wrong.

Yes.

> The ones your trace _does_ show are the ones that got inserted correctly 
> and aren't buggy. Can anybody see how that buggy resource got inserted?

Carefully studying the results of git grep insert_resource doesn't show
too many options.  Most are in code which doesn't get executed on ia64.
add_window is the only one which looks even remotely plausible, and
that's only supposed to be called for root bridges.

I did notice that pcibios_setup_root_windows() is being called too late.
It's currently called after pci_scan_bus_parented() when it needs to be
called from pcibios_fixup_bus() [ie during the scan_bus, before child
busses are scanned].

Andrew's currently testing this patch:


diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 61f1af5..ae5ee8a 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -371,8 +371,6 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
 	 * such quirk. So we just ignore the case now.
 	 */
 	pbus = pci_scan_bus_parented(NULL, bus, &pci_root_ops, controller);
-	if (pbus)
-		pcibios_setup_root_windows(pbus, controller);
 
 	return pbus;
 
@@ -490,6 +488,8 @@ pcibios_fixup_bus (struct pci_bus *b)
 	if (b->self) {
 		pci_read_bridge_bases(b);
 		pcibios_fixup_bridge_resources(b->self);
+	} else {
+		pcibios_setup_root_windows(b, b->sysdata);
 	}
 	list_for_each_entry(dev, &b->devices, bus_list)
 		pcibios_fixup_device_resources(dev);

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ