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:	Thu, 19 Oct 2006 15:38:14 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jesse.barnes@...el.com
Cc:	eiichiro.oiwa.nm@...achi.com, alan@...hat.com, greg@...ah.com,
	linux-kernel@...r.kernel.org
Subject: Re: pci_fixup_video change blows up on sparc64

From: Jesse Barnes <jesse.barnes@...el.com>
Date: Thu, 19 Oct 2006 09:52:21 -0700

> On Thursday, October 19, 2006 1:37 am, David Miller wrote:
> > 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.
> 
> Right, I guess we should have been a bit more careful in making this 
> code generic.  At least ia64, i386 and x86_64 systems often have video 
> BIOSes in system memory at 0xc0000 (note that this isn't in PCI space).  

Even if it is in system memory there, accessing physical RAM using
ioremap() and asm/io.h accessors is not exactly legal.  On sparc64,
for example, accessing physical RAM as if it were I/O memory will
result in a BUS ERROR and in fact that's how the bootup crashes
on sparc64 due to this changeset.

Sparc64 systems do not reserve this area of physical ram for video
ROM, and in fact it is very common and possible to have a system
which there is not even physical RAM located at that physical address.

The amount of platforms-specific assumptions made by this code is
impressive, in fact :-)

> It sounds like on your system the regular sysfs ROM mapping code should 
> be able to see the ROM, and this 0xc0000 mapping/copying shouldn't be 
> necessary.

I'm pretty sure it should use the PCI ROM bar area, just like it
always has until this change was installed.

> Maybe we should conditionalize it, making it only available on ia64, 
> i386 and x86_64?  Then again, I think there are some embedded platforms 
> that could use this code too?

This is what should happen, at the very least.
-
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