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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 19 Jan 2012 15:41:51 -0700
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ram Pai <linuxram@...ibm.com>,
	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	linux-pci@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] PCI: restrict subordinate buses to those reachable
 via host bridge

On Thu, Jan 19, 2012 at 3:23 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Thu, Jan 19, 2012 at 2:13 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
>> On Thu, Jan 19, 2012 at 1:42 PM, Yinghai Lu <yinghai@...nel.org> wrote:
>>> please check attached patch.
>>
>> You added bus_max to pci_scan_root_bus().  I'd prefer to pass a
>> pointer to a struct resource, as we do for io & mem resources.
>
> Well that depends.

Well, I suppose it does.  On what?

>> I'd
>> like to move away from pci_scan_root_bus() and toward a
>> pci_scan_host_bridge() (as in the patches I posted) that takes all the
>> host bridge-related info: parent, domain, resources (including bus
>> number range), ops, sysdata.  I don't like the current scheme of
>> "create it with defaults and fix them later."
>
> No, struct host bridge is bad idea.  you are tracking host bridge and
> peer root bus the same time.

Obviously host bridges and root buses are related, but it'd be useful
if you could give some clue about *why* you think this is a bad idea.
Redundancy, complication, what?

Root buses are special in important ways, and we currently don't have
a way to deal with that.  For example, everything below a host bridge
has the same domain, and we don't have a good place to keep the
domain.  The busn_res you add to struct pci_bus is only useful for
root buses, so I don't think pci_bus is quite the right place.

>> struct pci_bus already has secondary & subordinate.  I don't think
>> adding a "struct resource busn_res" adds useful information except for
>> the root bus, where the bus number range comes from something external
>> like _CRS rather than from the upstream bridge config.
>
> no, we need that to tracking the busn usage. aka insert them into
> iobusn_resource tree.

If we want a tree, I think we should just convert pci_bus.secondary
and subordinate to a struct resource and insert that.  Otherwise we
have redundant information.

> late it should be convert to list head even. for handling transparent bridge.

I think you're talking about a host bridge that passes multiple bus
number ranges, e.g., a PNP0A08 device with "[bus 00-3f] [bus 80-ff]"
in _CRS.  That makes sense.  I haven't seen anything like that, but it
seems like it would be legal.  But that wouldn't make sense for a P2P
bridge, so it doesn't seem like pci_bus is the right place for it.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ