papi_native_avail and setcap

Open discussion of PAPI.

papi_native_avail and setcap

Postby cnavarrete » Fri Jun 21, 2013 10:19 am

Hi all,
We are having some errors regarding papi_native_avail even when this binary has the cap_sys_rawio=ep flag.
Code: Select all
(as root)
setcap cap_sys_rawio=ep /usr/local/bin/papi_native_avail
getcap /usr/local/bin/papi_native_avail
  >> /usr/local/bin/papi_native_avail = cap_sys_rawio+ep


If we strace the papi_native_avail call, we get:
Code: Select all
(as normal user)
strace -f /usr/local/bin/papi_native_avail &> a
grep -i EPERM a
  >> open("/dev/cpu/0/msr", O_RDONLY)        = -1 EPERM (Operation not permitted)


In our case, /usr is located at the local filesystem partition and /dev/cpu/*/msr rights are:
Code: Select all
ls -la /dev/cpu/*/msr
  >> crw-rw---- 1 root sim114 202, 0 10. Jun 08:01 /dev/cpu/0/msr
  >> crw-rw---- 1 root sim114 202, 1 10. Jun 08:01 /dev/cpu/1/msr
  >> crw-rw---- 1 root sim114 202, 2 10. Jun 08:01 /dev/cpu/2/msr
  >> crw-rw---- 1 root sim114 202, 3 10. Jun 08:01 /dev/cpu/3/msr


belonging, of course, the user that runs the papi_native_avail application to the sim114 group.

What`s missing?

Thanks in advance!
Carmen Navarrete
cnavarrete
 
Posts: 6
Joined: Tue Jan 15, 2013 10:35 am

Re: papi_native_avail and setcap

Postby cnavarrete » Fri Jun 21, 2013 10:24 am

I forgot to write that there are no SELinux or apparmor running on that machine.

Thanks again!
Carmen Navarrete
cnavarrete
 
Posts: 6
Joined: Tue Jan 15, 2013 10:35 am


Return to General discussion

Who is online

Users browsing this forum: No registered users and 2 guests