summaryrefslogtreecommitdiff
path: root/internal/generate/family_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-30 17:12:25 +0300
committerPaul Buetow <paul@buetow.org>2026-05-30 17:12:25 +0300
commite462a4d9963a2949f0670a00a013dd362b5219d1 (patch)
treec867fda30f98a31bc507f0a25c35e373243b7068 /internal/generate/family_test.go
parent07927004d6403dc88a8c24b2751d845ec1765376 (diff)
kexec_load: classify into Security family with its sibling
kexec_load(2) and kexec_file_load are documented together on the same man page and both load a new kernel for later execution by reboot(2). kexec_file_load was already FamilySecurity, but kexec_load fell through to FamilyMisc. Move kexec_load to FamilySecurity so the siblings share a family. Kind classification was already correct: kexec_load takes raw user pointers (KindNull, no fd/path) while kexec_file_load takes fds (KindFd); the return value (long 0/-1, no byte count) stays UNCLASSIFIED. Update docs/syscall-tracing-plan.md to match, regenerate artifacts, and add lock-in tests for the family and UNCLASSIFIED return of both kexec syscalls plus reboot. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate/family_test.go')
-rw-r--r--internal/generate/family_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/generate/family_test.go b/internal/generate/family_test.go
index 475a75f..9dd9a8b 100644
--- a/internal/generate/family_test.go
+++ b/internal/generate/family_test.go
@@ -147,6 +147,13 @@ func TestClassifySyscallFamily(t *testing.T) {
{"sys_enter_epoll_wait", FamilyPolling},
{"sys_enter_io_uring_enter", FamilyAIO},
{"sys_enter_bpf", FamilySecurity},
+ // kexec_load and kexec_file_load are siblings on the kexec_load(2) man
+ // page (both load a new kernel for later execution by reboot(2)) and
+ // must share the Security family even though kexec_load takes raw user
+ // pointers (KindNull) and kexec_file_load takes fds (KindFd).
+ {"sys_enter_kexec_load", FamilySecurity},
+ {"sys_enter_kexec_file_load", FamilySecurity},
+ {"sys_exit_kexec_load", FamilySecurity},
// Futexes are shared-memory synchronization/IPC primitives ("fast
// user-space locking", futex(2)); the classic futex() and the Linux
// 6.7+ split syscalls all classify as IPC alongside the System V