Skip to content

Add file-capability allowlist option - #46

Merged
lvaroqui merged 1 commit into
masterfrom
cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation
Oct 7, 2026
Merged

lvaroqui merged 1 commit into
masterfrom
cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation

Conversation

@lvaroqui

@lvaroqui lvaroqui commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@lvaroqui
lvaroqui requested a review from not-matthias October 5, 2026 12:55
@lvaroqui
lvaroqui force-pushed the cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation branch from 69a1cda to a4ec63f Compare October 5, 2026 12:58
@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds file-capability allowlist option to Valgrind core.

The PR appears safe to merge, though the earlier non-blocking request for broader permission-check coverage remains open.

Fix All in Claude CodeFindings

  1. P2 Capability override lacks regression tests ▶
Fix with agent prompt
### Issue 1
coregrind/m_libcfile.c:1105-1106
The new tests cover description registration, but none exercises this permission check. A test with matching and nonmatching file-capability executables, a setuid or setgid executable, and a traced child would catch a change that silently disables or broadens the override.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR adds an opt-in executable-name pattern override for running file-capability executables without their capabilities. Since the previous review, it also adds CI support and regression tests for matching and nonmatching traced children.

Reviews (2) · Last reviewed commit: "feat: add --allow-file-caps to run execu..."

Comment thread coregrind/m_libcfile.c
@greptile-apps

This comment has been minimized.

@lvaroqui
lvaroqui force-pushed the cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation branch from a4ec63f to 700eb1e Compare October 5, 2026 13:13
@codspeed

codspeed Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 84 untouched benchmarks
⏩ 60 skipped benchmarks1


Comparing cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation (c1a37ef) with master (0540362)

Open in CodSpeed

Footnotes

  1. 60 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@lvaroqui lvaroqui changed the title Cod 3722 ignore process spawning overhead in exec harness simulation Add file-capability allowlist option Oct 5, 2026
Valgrind loads the client executable itself, so the kernel never grants
it its file capabilities, and Valgrind refuses to run such executables
(EACCES, exit code 126 from a shell) rather than run them without the
capabilities they expect. Some executables carry capabilities that only
part of their code needs, and run fine without them.

--allow-file-caps=patt1,patt2,... takes patterns in the
--trace-children-skip syntax. An executable whose name matches is run
despite its file capabilities, without them. It applies to the client
executable and to traced children, so the option is parsed in the early
pass, before the client is loaded. Setuid and setgid executables are
still refused.

The tests create a capped executable with setcap, sudo -n setcap, or an
unprivileged user namespace, and are skipped when none is available.
CI installs setcap so that they run there.

Refs COD-3722
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lvaroqui
lvaroqui force-pushed the cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation branch from 700eb1e to c1a37ef Compare October 7, 2026 09:44
@lvaroqui
lvaroqui merged commit be21f11 into master Oct 7, 2026
9 checks passed
@lvaroqui
lvaroqui deleted the cod-3722-ignore-process-spawning-overhead-in-exec-harness-simulation branch October 7, 2026 10:34
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.

2 participants