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
| ||
|
Date: Sun, 20 Dec 2009 16:59:40 -0700 From: Bjorn Helgaas <bjorn.helgaas@...com> To: Linus Torvalds <torvalds@...ux-foundation.org> Cc: Yinghai Lu <yinghai@...nel.org>, Jesse Barnes <jbarnes@...tuousgeek.org>, Ingo Molnar <mingo@...e.hu>, Ivan Kokshaysky <ink@...assic.park.msu.ru>, Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>, Alex Chiang <achiang@...com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org> Subject: Re: [PATCH 2/12] pci: add pci_bridge_release_unused_res and pci_bus_release_unused_bridge_res -v2 On Fri, 2009-12-18 at 13:24 -0800, Linus Torvalds wrote: > > On Fri, 18 Dec 2009, Yinghai Lu wrote: > > > > so later we could use it to release small resource before pci assign unassign res > > However, I think this one is wrong. > > > +static void release_child_resources(struct resource *r) > > +{ > > + struct resource *p; > > + resource_size_t size; > > + > > + p = r->child; > > + while (p) { > > + release_child_resources(p); > > + release_resource(p); > > So not only is this releasing resources that aren't necessarily PCI > devices, it's releasing the whole tree - regardless of how they were > allocated and initialized. ... Help me fill in my mental picture of these resources ... This function just takes a struct resource, so it doesn't know whether it's a PCI, ACPI, or other resource. But in Yinghai's usage, I think we do know that we're starting with a PCI resource. In that case, is it possible that some child is a non-PCI resource? The picture in my mind is that once we are downstream of a PCI host bridge, all child resources must be PCI, and they must all conform to the forwarding rules for PCI bridges and so on. I know there are PCI devices with BARs at non-standard places, so Linux wouldn't know about those resources (and that worries me a bit when we're talking about reprogramming a bridge window that might be upstream of such a device). But if Linux *did* learn about those non-standard resources via a quirk or something, I would still think of those as PCI resources, not ACPI or something else. Anyway, I'd like to correct my mental picture if it's mistaken. Bjorn -- 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