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

Update capabilities #3931

Merged
merged 2 commits into from
Jun 6, 2023
Merged

Update capabilities #3931

merged 2 commits into from
Jun 6, 2023

Conversation

jprendes
Copy link
Contributor

@jprendes jprendes commented Jun 6, 2023

- What I did
The hardcoded list of capabilities was missing some capabilities introduced in kernel 5.8 and 5.9.
This PR changes the code to retrieve the capabilities using gocapability.

- How I did it

  • Vendored gocapability/capability in cmd/linuxkit
  • Change hardcoded list with code that gets the list using capability.List()

- How to verify it
Builds with images defining org.mobyproject.config with {"capabilities": ["all"], ...} should see CAP_PERFMON, CAP_BPF, and CAP_CHECKPOINT_RESTORE added to their list of capabilities.

- Description for the changelog
Fix missing capabilities in newer kernels

- A picture of a cute animal (not mandatory but encouraged)
shutterstock_1929991988-300x200

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
@deitch deitch merged commit aad12b5 into linuxkit:master Jun 6, 2023
22 checks passed
@mqasimsarfraz
Copy link

@jprendes @dgageot by any chance do you have an idea please if kubernetes/minikube#13742 (comment) was related to this? I am getting an error when trying to run a container with CAP_BPF on docker on Mac.

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.

None yet

4 participants