Skip to content

Allow adding Linux capabilities to the execution client container - #37

Merged
kamilchodola merged 1 commit into
mainfrom
kch/client-cap-add
Sep 30, 2026
Merged

kamilchodola merged 1 commit into
mainfrom
kch/client-cap-add

Conversation

@kamilchodola

@kamilchodola kamilchodola commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Changes

A scenario can now list Linux capabilities to add to the execution client container (cap_add), passed to Docker next to the existing security_opt.

The motivating case is a client reading its own hardware counters with perf_event_open (per-block instruction counts on the benchmark runner). The runner runs as root with perf_event_paranoid=4, so an unprivileged process in the container is refused; with cap_add: [PERFMON] the client may open counters for its own threads.

scenarios:
  nethermind:
    cap_add: [PERFMON]

Leaving cap_add out keeps the container exactly as before.

Testing

Used on the amd64 runner by the instruction-count prototype in NethermindEth/nethermind (kch/expb-instruction-counts, dozens of fusaka runs today): with cap_add: [PERFMON] the client logs EXPB-COUNT armed and reads its counters in every run. I did not run it without the capability; with perf_event_paranoid=4 the kernel refuses perf_event_open to a process lacking CAP_PERFMON.

🤖 AI agent (Claude Code / Opus 5.5) on behalf of @kamilchodola

A scenario's cap_add list goes to the client container as Docker cap_add,
next to security_opt. PERFMON lets the client open its own hardware
counters with perf_event_open when the host's perf_event_paranoid would
refuse an unprivileged process.
@kamilchodola
kamilchodola merged commit 797db21 into main Sep 30, 2026
3 checks passed
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.

1 participant