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, 22 Dec 2007 01:12:18 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Ivan Kokshaysky <ink@...assic.park.msu.ru>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Richard Henderson <rth@...ddle.net>,
	Chuck Ebbert <cebbert@...hat.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Daniel Ritz <daniel.ritz@....ch>, Greg KH <greg@...ah.com>
Subject: Re: PCI resource problems caused by improper address rounding

On Thu, 20 Dec 2007 11:46:16 +0300 Ivan Kokshaysky <ink@...assic.park.msu.ru> wrote:

> PCI: do respect full 64-bit address for bridge prefetch window
> 
> Prevent the prefetch window from being programmed with a bogus address
> when its respective resource gets allocated above the 4G mark.
> 
> Note that we cannot yet guarantee correct resource allocations
> above 4G, though it might work in some simple cases.
> 

So.. did we agree that this patch is good to go?

> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -208,8 +208,11 @@ pci_setup_bridge(struct pci_bus *bus)
>  	}
>  	pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l);
>  
> -	/* Clear out the upper 32 bits of PREF base. */
> -	pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0);
> +	/* Set up the upper 32 bits of PREF base/limit. */
> +	l = region.start >> 16 >> 16;

We have the little upper_32_bits() helper for this.

> +	pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, l);
> +	l = region.end >> 16 >> 16;
> +	pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, l);
>  
>  	pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl);
>  }

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