All of lore.kernel.org
 help / color / mirror / Atom feed
* PCI BAR sysfs node permissions
@ 2014-12-09 21:22 Dennis McLeod
  2014-12-09 21:48 ` Alex Williamson
  2014-12-14  3:39 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Dennis McLeod @ 2014-12-09 21:22 UTC (permalink / raw)
  To: linux-pci

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.

Please help!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-14  5:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 21:22 PCI BAR sysfs node permissions Dennis McLeod
2014-12-09 21:48 ` Alex Williamson
2014-12-14  3:39 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.