Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User's Guide: Improve documentation about correct udev setup for cxl devices #136

Open
fhaverkamp opened this issue Jan 13, 2017 · 1 comment
Assignees

Comments

@fhaverkamp
Copy link
Collaborator

I received the following contribution from Scott, who had obviously issues with the udev configuration. We had similar things already before, and I think it is time now to update our User's guide to preserve this info helping to setup the cxl device such normal users can access it.

I personally prefere a setup without the cxl group and just have 0666 and root as owner. Let's see.

Frank,

Your doc is a bit vague and sparse concerning udev rules, at least for ubuntu 16.04. In 16.04 the ref'ed dir is empty e.g.

root@smnorm:/etc/udev/rules.d# cd /etc/udev/rules.d/
root@smnorm:/etc/udev/rules.d# ls
root@smnorm:/etc/udev/rules.d#

Michael H used some of his instruction from the CAPI flash GT card to get non-root user to work, below is what he did. And that fixed the non-root user issue (not the path issues)

UDEV Rules / Device Permissions for /dev/cxl

Access to the CAPI device is restricted to members of the 'cxl' group. This configuration is controlled by udev rules, and triggered on reboot. To reconfigure this:

Ensure the 'cxl' group exists. Create it if it doesn't exist. 

useradd --system --user-group cxl

Create /lib/udev/rules.d/80-cxl.rules as root: 

sudo touch /lib/udev/rules.d/80-cxl.rules

Place the following in the 80-cxl.rules file: 

SUBSYSTEM=="cxl", ATTRS{mode}=="dedicated_process", GROUP="cxl", MODE="0660"
SUBSYSTEM=="cxl", ATTRS{mode}=="afu_directed", KERNEL=="afu[0-9]*.[0-9]m", OWNER="cxl", GROUP="cxl", MODE="0660"
SUBSYSTEM=="cxl", ATTRS{mode}=="afu_directed", KERNEL=="afu[0-9]
.[0-9]*s", OWNER="cxl", GROUP="cxl", MODE="0660"

Add your user to the "cxl" group, then log out / log in: 

adduser ubuntu cxl

Important

You must log out / log in to pick up new group membership for the currently-logged in user!

Retrigger udev to apply the correct permissions: 

udevadm trigger -s cxl

Scott Carroll

@fhaverkamp
Copy link
Collaborator Author

I have added this to our wiki too. I personally think that introducing the cxl group is more complicating things than really helpful. I think the cxl devices should just be rw for users in most cases.

https://github.com/ibm-genwqe/genwqe-user/wiki/udev-rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant