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
| ||
|
Date: Thu, 19 Oct 2006 19:01:06 +0900 From: <eiichiro.oiwa.nm@...achi.com> To: "David Miller" <davem@...emloft.net> Cc: <alan@...hat.com>, <jesse.barnes@...el.com>, <greg@...ah.com>, <linux-kernel@...r.kernel.org> Subject: Re[2]: pci_fixup_video change blows up on sparc64 >> If an expansion ROM exists on ATI Radeon or ATY128 card, pci_map_rom returns >> the expansion ROM base address instead of 0xC0000 because fixup_video checks >> the VGA Enable bit in the Bridge Control register. > >It is not valid to expect the bridge control register to return >anything meaningful on PCI "host bridge". The Radeon card here sits >on the root, just under the PCI Host Controller. The code in >fixup_video appears to assume that every bus up to the root from >the VGA device is a PCI-PCI bridge, which is not a valid assumption. >There can be a PCI host bridge at the root. Have you ever read the PCI-to-PCI Bridge Architecture Specification? The default of VGA Enable bit is 0. This mean video ROM doesn't forward system RAM at 0xC0000. There is your VGA card under 0001:00:00.0 Host bridge. The VGA Enable bit in this host bridge will return 0 and IORESOURCE_ROM_SHADOW won't set. >Also, and more importantly, you cannot use the 0xc0000 address in a >raw way like this. There are multiple PCI domains possible in a >given system, and the 0xc0000 address you wish to use must be relative >to that PCI domain. > >Therefore, in the presence of multiple PCI domains: > > x = ioremap(0xc0000, ...); > >doesn't make any sense, is extremely non-portable, and will crash >on many non-x86 systems. It's impossible that multiple VGA cards, which have not the expansion ROM, exist in a system regardless of multiple PCI domain system. >All of this pci_fixup_video code was perfectly fine when it was only >used on x86, where assumptions like this happened to work, but it is >not possible to continue making these assumptions if this code will >now run on every single architecture. pci_fixup_video is also perfectly fine on IA64. And VGA is historical device of x86 platform. - 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