[systemd-devel] How to give users permissions to /dev/kfd

Tom Stellard tstellar at redhat.com
Fri Oct 13 22:07:32 UTC 2017


On 10/12/2017 09:04 PM, Mantas Mikulėnas wrote:
> On Fri, Oct 13, 2017, 00:30 Tom Stellard <tstellar at redhat.com <mailto:tstellar at redhat.com>> wrote:
> 
>     Hi,
> 
>     The amdkfd kernel driver exposes the /dev/kfd device file for doing gpgpu
>     computing on AMD GPUs, I would like to setup the permissions on this device
>     file, so that regular users can access it.  I think it makes sense to
>     try to copy what is being done for the other GPU device files, like /dev/dri/cardX.
>     I can see the udev rules for these /dev/dri/cardX, but on my system it looks like
>     something is giving users access to these files using  access control lists
>     (acls), but I'm not sure where the acls are being modified.  Is systemd only responsible
>     for the udev rules or is there something else in systemd I need to modify to
>     get the acls set correctly?
> 
> 
> udev applies these ACLs to all devices tagged with TAG+="uaccess" from udev rules.
> 
> (The tagging is kind of an internal detail and your rules are supposed to use ENV{ID_this_and_that}, but... for personal use it works well enough.)
> 
> Just make sure you get the rule ordering right, I think 71-something.rules is a good place. I can't check right now, might be remembering wrong.
> 

Thanks.  I've been experimenting with this, and I noticed that the ACLs are
not set when I login to the machine via ssh.  Is there something else I need
to do to get these ACLs enabled for ssh sessions?

Thanks,
Tom

> -- 
> 
> Mantas Mikulėnas <grawity at gmail.com <mailto:grawity at gmail.com>>
> Sent from my phone
> 



More information about the systemd-devel mailing list