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]
Date:	Sat, 04 Feb 2012 10:38:12 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	Yinghai Lu <yinghai@...nel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Tony Luck <tony.luck@...el.com>,
	Dominik Brodowski <linux@...inikbrodowski.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: Re: [PATCH 02/15] PCI: Add iobusn_resource

On Fri, 2012-02-03 at 08:36 -0800, Bjorn Helgaas wrote:
> On Wed, Feb 1, 2012 at 2:43 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> > also add busn_res into struct pci_bus.
> >
> > will use them to have bus number resource tree.
> 
> Will you make this tree visible in /proc?  Seems like that would be
> useful for debugging and for symmetry with /proc/iomem and
> /proc/ioports.

To be honest that whole business with bus numbers in struct resource
seems like gratuituous bloat & over engineering to me ...

Does it actually solve a specific problem or serve a purpose ?

Cheers,
Ben.

> 
> > Signed-off-by: Yinghai Lu <yinghai@...nel.org>
> > ---
> >  include/linux/ioport.h |    1 +
> >  include/linux/pci.h    |    1 +
> >  kernel/resource.c      |    8 ++++++++
> >  3 files changed, 10 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/ioport.h b/include/linux/ioport.h
> > index e885ba2..6fe9e19 100644
> > --- a/include/linux/ioport.h
> > +++ b/include/linux/ioport.h
> > @@ -136,6 +136,7 @@ struct resource {
> >  /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
> >  extern struct resource ioport_resource;
> >  extern struct resource iomem_resource;
> > +extern struct resource iobusn_resource;
> >
> >  extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
> >  extern int request_resource(struct resource *root, struct resource *new);
> > diff --git a/include/linux/pci.h b/include/linux/pci.h
> > index f8caaab..94ad468 100644
> > --- a/include/linux/pci.h
> > +++ b/include/linux/pci.h
> > @@ -419,6 +419,7 @@ struct pci_bus {
> >        struct list_head slots;         /* list of slots on this bus */
> >        struct resource *resource[PCI_BRIDGE_RESOURCE_NUM];
> >        struct list_head resources;     /* address space routed to this bus */
> > +       struct resource busn_res;       /* track registered bus num range */
> 
> Is this different from bus.secondary and bus.subordinate?  Do we need
> both busn_res and secondary/subordinate?  If we need both, in what
> circumstance with they contain different information?
> 
> >        struct pci_ops  *ops;           /* configuration access functions */
> >        void            *sysdata;       /* hook for sys-specific extension */
> > diff --git a/kernel/resource.c b/kernel/resource.c
> > index 7640b3a..53b42f0 100644
> > --- a/kernel/resource.c
> > +++ b/kernel/resource.c
> > @@ -38,6 +38,14 @@ struct resource iomem_resource = {
> >  };
> >  EXPORT_SYMBOL(iomem_resource);
> >
> > +struct resource iobusn_resource = {
> > +       .name   = "PCI busn",
> > +       .start  = 0,
> > +       .end    = 0xffffff,
> > +       .flags  = IORESOURCE_BUS,
> > +};
> > +EXPORT_SYMBOL(iobusn_resource);
> > +
> >  /* constraints to be met while allocating resources */
> >  struct resource_constraint {
> >        resource_size_t min, max, align;
> > --
> > 1.7.7
> >
> --
> 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/


--
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