From f12c93dbf6ac839b25c1863aaa37d3d8be6d7a23 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 29 May 2026 22:02:06 +0300 Subject: ioprio_set/ioprio_get: classify as Process family Audit of ioprio_set found a family inconsistency. ioprio_set(which, who, ioprio) and ioprio_get(which, who) query/set the I/O scheduling class and priority of a process, process group, or user. They are the direct I/O-priority analogues of getpriority/setpriority (the CPU nice value) and share the identical which/who selector signature, yet were falling through to FamilyMisc while getpriority/setpriority are FamilyProcess. Reclassify both ioprio syscalls to FamilyProcess for consistency with their priority siblings, update docs/syscall-tracing-plan.md, and regenerate the tracepoint/type artifacts (mage generate is idempotent). Argument capture is unchanged and confirmed correct: the args are all ints (which/who/ioprio), none named fd/path, so ClassifyFormat returns KindNone and the generator promotes the enter format to KindNull (null_event). In particular the 'who' argument (a pid/pgid/uid, never an fd) is not misclassified as KindFd. The exit is a ret_event (UNCLASSIFIED, int 0/-1). Add lock-in tests: - TestClassifyIoprioNullKind asserts KindNone/KindNull using the real kernel tracepoint fields, proving 'who' is not captured as an fd. - Family assertions for the ioprio pair alongside getpriority/setpriority so a stray reclassification of any of them trips the test. Co-Authored-By: Claude Opus 4.8 --- internal/tracepoints/generated_tracepoints.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/tracepoints') diff --git a/internal/tracepoints/generated_tracepoints.go b/internal/tracepoints/generated_tracepoints.go index 92d08ce..a53fcca 100644 --- a/internal/tracepoints/generated_tracepoints.go +++ b/internal/tracepoints/generated_tracepoints.go @@ -866,8 +866,8 @@ var syscallFamilies = map[string]string{ "ioctl": "FS", "ioperm": "Misc", "iopl": "Misc", - "ioprio_get": "Misc", - "ioprio_set": "Misc", + "ioprio_get": "Process", + "ioprio_set": "Process", "kcmp": "Process", "kexec_file_load": "Security", "kexec_load": "Misc", -- cgit v1.2.3