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:	Tue, 13 Oct 2009 00:58:08 -0400
From:	spender@...ecurity.net (Brad Spengler)
To:	Matthew Wilcox <matthew@....cx>
Cc:	Yinghai Lu <yinghai@...nel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	linux-ia64@...r.kernel.org
Subject: Re: [PATCH] ia64: Don't call SAL < 3.2 for extended config space

I've confirmed that the below patch (with the syntax fixes already 
mentioned) resolves the issue on the SGI 750.

-Brad

> From: Matthew Wilcox <willy@...ux.intel.com>
> Subject: Require SAL 3.2 in order to do extended config space ops
> 
> We had assumed that SAL firmware would return an error if it didn't
> understand extended config space.  Unfortunately, the SAL on the SGI 750
> doesn't do that, it panics the machine.  So, condition the extended PCI
> config space accesses on SAL revision 3.2.
> 
> Signed-off-by: Matthew Wilcox <willy@...ux.intel.com>
> 
> diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
> index 7de76dd..61363cc 100644
> --- a/arch/ia64/pci/pci.c
> +++ b/arch/ia64/pci/pci.c
> @@ -56,10 +56,13 @@ int raw_pci_read(unsigned int seg, unsigned int bus, unsigned int devfn,
>  	if ((seg | reg) <= 255) {
>  		addr = PCI_SAL_ADDRESS(seg, bus, devfn, reg);
>  		mode = 0;
> -	} else {
> +	} else if (sal_revision >= SAL_VERSION_CODE(3,2))
>  		addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg);
>  		mode = 1;
> +	} else {
> +		return -EINVAL;
>  	}
> +
>  	result = ia64_sal_pci_config_read(addr, mode, len, &data);
>  	if (result != 0)
>  		return -EINVAL;
> @@ -80,9 +83,11 @@ int raw_pci_write(unsigned int seg, unsigned int bus, unsigned int devfn,
>  	if ((seg | reg) <= 255) {
>  		addr = PCI_SAL_ADDRESS(seg, bus, devfn, reg);
>  		mode = 0;
> -	} else {
> +	} else if (sal_revision >= SAL_VERSION_CODE(3,2))
>  		addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg);
>  		mode = 1;
> +	} else {
> +		return -EINVAL;
>  	}
>  	result = ia64_sal_pci_config_write(addr, mode, len, value);
>  	if (result != 0)
> 
> -- 
> 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."

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ