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]
Message-ID: <20091124131912.2aabb852@jbarnes-piketon>
Date:	Tue, 24 Nov 2009 13:19:12 -0800
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Yu Zhao <yu.zhao@...el.com>,
	Matthew Wilcox <willy@...ux.intel.com>
Subject: Re: [PATCH] x86/pci: claim SR-IOV bar in pcibios_allocate_resource

On Sat, 14 Nov 2009 23:46:46 -0800
Yinghai Lu <yinghai@...nel.org> wrote:

> 
> so use correct allocation from BIOS, instead of later assign another
> one.
> 
> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
> 
> ---
>  arch/x86/pci/i386.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/arch/x86/pci/i386.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/pci/i386.c
> +++ linux-2.6/arch/x86/pci/i386.c
> @@ -155,7 +155,9 @@ static void __init pcibios_allocate_reso
>  
>  	for_each_pci_dev(dev) {
>  		pci_read_config_word(dev, PCI_COMMAND, &command);
> -		for (idx = 0; idx < PCI_ROM_RESOURCE; idx++) {
> +		for (idx = 0; idx < PCI_BRIDGE_RESOURCES; idx++) {
> +			if (idx == PCI_ROM_RESOURCE)
> +				continue;
>  			r = &dev->resource[idx];
>  			if (r->parent)		/* Already
> allocated */ continue;

I'm worried this might have side effects beyond just allocating SR-IOV
BARs, since it looks like we'll walk through all the bridge resources
all the time?

-- 
Jesse Barnes, Intel Open Source Technology Center
--
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