<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Oct 14, 2017 at 1:07 AM, Tom Stellard <span dir="ltr"><<a href="mailto:tstellar@redhat.com" target="_blank">tstellar@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10/12/2017 09:04 PM, Mantas Mikulėnas wrote:<br>
<span class="">> On Fri, Oct 13, 2017, 00:30 Tom Stellard <<a href="mailto:tstellar@redhat.com">tstellar@redhat.com</a> <mailto:<a href="mailto:tstellar@redhat.com">tstellar@redhat.com</a>>> wrote:<br>
><br>
> Hi,<br>
><br>
> The amdkfd kernel driver exposes the /dev/kfd device file for doing gpgpu<br>
> computing on AMD GPUs, I would like to setup the permissions on this device<br>
> file, so that regular users can access it. I think it makes sense to<br>
> try to copy what is being done for the other GPU device files, like /dev/dri/cardX.<br>
> I can see the udev rules for these /dev/dri/cardX, but on my system it looks like<br>
> something is giving users access to these files using access control lists<br>
> (acls), but I'm not sure where the acls are being modified. Is systemd only responsible<br>
> for the udev rules or is there something else in systemd I need to modify to<br>
> get the acls set correctly?<br>
><br>
><br>
> udev applies these ACLs to all devices tagged with TAG+="uaccess" from udev rules.<br>
><br>
> (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.)<br>
><br>
> 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.<br>
><br>
<br>
</span>Thanks. I've been experimenting with this, and I noticed that the ACLs are<br>
not set when I login to the machine via ssh. Is there something else I need<br>
to do to get these ACLs enabled for ssh sessions?<br></blockquote><div><br></div><div>No, it's only available for local sessions (ones which systemd-logind considers "local" + "active"). I think the idea is that console users automatically get more privileges in general.</div><div><br></div><div><i>(To update my last mail, I *think* the actual ACL setting is done by both udev (when the device first shows up) and systemd-logind (when sessions are switched).)</i></div><div><br></div><div>For SSH-only usage, use traditional groups (e.g. add yourself to the "video" group). To assign group ownership to /dev/kfd, use GROUP="foo" in udev rules.</div><div><br></div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>