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

perf_event_uncore: consider capabilities for permissions #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

voidbert
Copy link

Pull Request Description

Fixed issue #200 by reading capabilities using the capget system call. Now, users other than root can use PAPI to read uncore counters, provided they have one of the following capabilities: CAP_SYS_ADMIN or CAP_PERFMON.

Some rationale and future possibilities

  • I opted to use the capget system call directly, not to add libcap as another dependency.

  • I'd like to ask if there's any reason why system call numbers are manually defined. Would there
    be any issue arising from the use of the sys/syscall.h header?

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@Treece-Burgess Treece-Burgess linked an issue Sep 28, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

perf_event_uncore doesn't consider capabilities
1 participant