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

why root? #44

Open
kindrt opened this issue Jan 25, 2019 · 2 comments
Open

why root? #44

kindrt opened this issue Jan 25, 2019 · 2 comments

Comments

@kindrt
Copy link

kindrt commented Jan 25, 2019

Why does one need to be root to run capi-flash-script.sh? Is there a particular technical reason for this? Or is this just a safety requirement?

@bmesnet
Copy link
Contributor

bmesnet commented Jun 5, 2019

Hello @kindrt
Sorry for the delay of the response. The main reason is that with CAPI the FPGA is intended to be used by several process/user and that resetting or reprogramming the FPGA needed to have a restricted access.

@bmesnet
Copy link
Contributor

bmesnet commented Aug 30, 2019

Logging discussion I had with kindrt

The problem is that the reset command/file is recreated by the kernel every time we mount a new card, meaning resetting the PCIe link. The rights are defined at the recreation obviously. I understand from the Linux guys that this is inherited from PCIe and we cannot do much on that....except that with Ubuntu everybody has access to source file, and can modify and adapt his code. We have just tested that successful. However for RHEL, we don't have access to the source files of the kernel.

A possible solution would be that root has a crontab setting chmod ugo+w on this /sys/class/cxl/card0/reset file. I don't know if there is a way to do that regularly or trigger on the recreation event of this reset file.
This may need some slight modification in the capi-flash/capi-reset files

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

2 participants