Re: 53C8XX /sys/devices/pci*/*/config revisited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 15, 2005 at 02:56:59PM +0200, Matthias Andree wrote:
> On Sun, 15 May 2005, Arjan van de Ven wrote:
> > > if hal reads more than 64 bytes of config space (heck if it reads config
> > > space at all) then it's terminally broken.
> > 
> > this brings up a bug in the kernel though....
> > the config file is user readable! That's just plain dangerous and imo it
> > should be a root-only file as a result.

The same is true of /proc/bus/pci.  Otherwise lspci doesn't work for non-root.

> The user can access only the first 64 bytes, but hald is apparently
> meant to run as root so it can hack /etc/fstab for subfs file systems
> and such. SUSE Linux 9.3 runs hald as root.
> 
> BTW, - note I have little clue of how PCI works - if the PCI
> configuration space is only 64 bytes tall, then why the f* is the sysfs
> .../config file listed as 256 bytes in the first place, even for root?

PCI has 256 bytes of config space.  However, not all vendors do sane
things with it (even though they're required to).  It's a bug in hald
that it reads more than it needs to ...

> Relevant pointers to free copies of the PCI standard (the old 32 bit 33
> MHz variant is sufficient) welcome, if such are available.

While they are not freely available, knowing that the name of the file is
"pci22.pdf" might help one locate non-legitimate copies.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux