Re: PCI BAR sysfs node permissions

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

 



On Tue, 2014-12-09 at 16:22 -0500, Dennis McLeod wrote:
> need help figuring out how to make this happen. If my pci driver is
> instructed to open a pci device, I want to change the mode of bar0's
> sysfs node to o+rw so a user app can mmap it.
> 
> In other words, from the driver, perform this:
> chmod 766 /sys/bus/pci/[slot path]/resource0
> preferably without a lecture on why I shouldn't .. ;-)
> 
> If I chmod that sysfs node for bar0 as root, i can run a user process
> (as regular user) that does an mmap of that and can do reads/writes to
> the bar resource. I would like for my pci driver to do this
> automatically when it is told to open a device.

This sounds like a future exploit.  Can the device to DMA?  Do you have
an IOMMU?  If yes & yes, have you heard of vfio-pci?  Thanks,

Alex

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