diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-29 11:13:32 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-29 11:13:32 +0300 |
| commit | c78920d55d58ff54ab4a6adbd425072963b7e8f9 (patch) | |
| tree | f32ffba78cea7332e87b61e819eb4c46514509a9 /internal/generate/retclassify_test.go | |
| parent | 1304189af554faa615dbab7c08a0d66b46bbdfe2 (diff) | |
test(generate): lock in rseq family and return classification
Audit of the rseq(2) syscall confirmed the existing classification is
correct and consistent with its siblings:
- KindNull: the rseq argument is a userspace struct pointer (not an fd or
filesystem path), and args[2] flags are intentionally not captured, in
line with the KindNull convention shared with set_robust_list and
membarrier. (Already covered by classify_test.go.)
- FamilyMisc: rseq is not in the explicit family table and falls through
to Misc, grouped with its closest per-thread sibling
set_robust_list/get_robust_list (also Misc).
- Return value is int 0/-1 with no byte count, so its exit stays
UNCLASSIFIED.
Add lock-in tests for the family and return-value classification (kind
was already covered) so a future drift in either is caught.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate/retclassify_test.go')
| -rw-r--r-- | internal/generate/retclassify_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/generate/retclassify_test.go b/internal/generate/retclassify_test.go index 1bbde51..3adae6e 100644 --- a/internal/generate/retclassify_test.go +++ b/internal/generate/retclassify_test.go @@ -47,6 +47,10 @@ func TestClassifyRetUnclassified(t *testing.T) { // gettimeofday(2) returns int 0/-1 (no byte count); its exit carries a // plain ret_event and must stay UNCLASSIFIED, not a read/write transfer. "gettimeofday", + // rseq(2) returns int 0/-1 on (un)registration of the restartable- + // sequences area; it transfers no bytes, so its exit must stay + // UNCLASSIFIED (plain ret_event), like its KindNull siblings. + "rseq", } for _, name := range unclassified { if got := ClassifyRet("sys_exit_" + name); got != Unclassified { |
