Re: dump more than 265 bytes PCI config SPACE

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

 



Matthew Wilcox wrote:
> On Thu, Mar 18, 2010 at 03:31:55PM -0400, Don Dutile wrote:
>> Matthew Wilcox wrote:
>>> So we need to figure out why your machine doesn't support extended
>>> config space.  What chipset does it use?  Is there a BIOS update available
>>> for it?  What does it report in dmesg for config space accesses?
>> In addition to having MMCONFIG enabled on the system (hw & kernel),
>> you also need to be root because of this snippet in drivers/pci/pci-sysfs.c,
>> pci_read_config():
>>         unsigned int size = 64;
>>         loff_t init_off = off;
>>         u8 *data = (u8*) buf;
>>
>>         /* Several chips lock up trying to read undefined config space */
>>         if (capable(CAP_SYS_ADMIN)) {
>>                 size = dev->cfg_size;
>>         } else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
>>                 size = 128;
>>         }
>>
>> which will truncate the read to 1st 64-bytes, so unpriv user can't
>> crash a system that has badly behaving PCI(e) config space.
>>
>> IMO, the CAP_SYS_ADMIN ought to be replaced w/a quirk check
>> for badly-behaving devices &/or chip sets.
> 
> Joyce already said at the start of the thread that they were able to
> get 256 bytes of config space.  Please don't hijack this thread where
> a user is receiving help.
> 
My apologies.  I thought I was helping. I wasn't trying to hijack the thread.
sorry for missing the '256' number in initial msg.

- Don
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux