Skip to content

Elevated access needed for RAPL in Linux #12

Description

@adelnoureddine

Access to RAPL data is restricted in Linux kernel to only privileged users (sudo/root), in order to avoid the PLATYPUS attack.

To avoid running Joular Core with sudo or root, a proposed approach is to set RAPL files to read for all users. Read status is reset on reboot, so the proposition is to add this right to /etc/sysfs.conf : mode class/powercap/intel-rapl:0/energy_uj = 0444.

In PowerJoular, we read 2 files for each RAPL domain: name and energy_uj. Both files need to have read rights.

Mainly theses files (if they exist):

/sys/class/powercap/intel-rapl/intel-rapl:1/energy_uj
/sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj
/sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:2/energy_uj
/sys/class/powercap/intel-rapl/intel-rapl:1/name
/sys/class/powercap/intel-rapl/intel-rapl:0/name
/sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:2/name
  • Add workaround for sysfs.conf in documentation page & readme
  • Add a script or simpler documentation to change permissions for RAPL file on boot for sysf.conf.

Activity

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions