diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-30 22:11:15 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-30 22:11:15 +0300 |
| commit | 04881431fb051fc9915184c54dffdcbb9aa5c65e (patch) | |
| tree | cd7a88571aaf0032ab8560f4abb51554d9517bee /internal/eventloop_kinds.go | |
| parent | dfb6190d109593227545df2e0caf82b6ee2c578f (diff) | |
test(perf_event_open): lock in audit findings
Audited perf_event_open(2) against the man page: it returns a new fd (or
-1), args[0] is a struct perf_event_attr* userspace pointer (NOT an fd),
args[1] is a monitored pid, and only args[3] group_fd is a real fd.
The existing implementation is correct (KindPerfOpen by name, not KindFd;
FamilySecurity; exit as UNCLASSIFIED RetEvent). Add lock-in tests:
- codegen: assert args[0] is read via bpf_probe_read_user as the attr
struct and never captured as an fd (negative assertions on args[0]/args[1]).
- eventloop: a failed return (-1) registers no fd in fdState.
- perfDescriptorName format pin (perf: prefix).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/eventloop_kinds.go')
0 files changed, 0 insertions, 0 deletions
