Skip to content

env: add --seal-output to lock down file output options#65

Merged
anakryiko merged 3 commits intomasterfrom
seal-output
Apr 28, 2026
Merged

env: add --seal-output to lock down file output options#65
anakryiko merged 3 commits intomasterfrom
seal-output

Conversation

@anakryiko
Copy link
Copy Markdown
Owner

Add a hidden --seal-output flag that prevents any subsequent -D, -T, or -J options from being accepted. This is intended for partially untrusted environments where a trusted runner controls file output locations (by placing -D/-T/-J before --seal-output) but allows untrusted users to append extra filtering, mode, or utrace options without being able to redirect output to arbitrary paths.

Since argp processes options left-to-right, the flag works as a simple boolean gate checked before each file-output option.

Add a hidden --seal-output flag that prevents any subsequent -D, -T, or
-J options from being accepted. This is intended for partially untrusted
environments where a trusted runner controls file output locations (by
placing -D/-T/-J before --seal-output) but allows untrusted users to
append extra filtering, mode, or utrace options without being able to
redirect output to arbitrary paths.

Since argp processes options left-to-right, the flag works as a simple
boolean gate checked before each file-output option.

Signed-off-by: Andrii Nakryiko <[email protected]>
Add --record as the explicit counterpart to --replay. The two are
mutually exclusive regardless of order. This allows an orchestrator
to enforce recording mode by placing --record before user-controlled
arguments, preventing replay of potentially untrusted data files.

Signed-off-by: Andrii Nakryiko <[email protected]>
Switch from per-element bpf_map_update_elem() to
bpf_map_update_batch() when populating the rbs hash-of-maps with
ringbuf FDs. Each individual map-in-map update triggers
synchronize_rcu() across all CPUs, taking 300+ ms per update. The
batch API performs synchronize_rcu() once for the entire batch,
reducing wprof startup time on a 316-core machine from ~13 seconds
to ~1 second.

Signed-off-by: Andrii Nakryiko <[email protected]>
@anakryiko anakryiko merged commit 68cc314 into master Apr 28, 2026
4 checks passed
@anakryiko anakryiko deleted the seal-output branch April 28, 2026 16:35
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