diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-02 09:51:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-02 09:51:14 +0300 |
| commit | 88769d471981911242dda27ed75d92866b2acf05 (patch) | |
| tree | 6acb367c7c8a41d6a000172d29485361bc9d1ebe /internal/generate | |
| parent | 3af826ec72c7a520f0993c0fa8842d347eba7fed (diff) | |
fix(classify): assign fanotify_init to FamilyIPC, not Misc
fanotify_init(2) creates and initializes an fanotify notification group
and returns an event-queue file descriptor. It is the direct analog of
inotify_init1 (both are filesystem-event notification facilities whose
group-creating syscall is a flags-taking fd-creator). inotify_init/
inotify_init1 are FamilyIPC alongside the other fd-based event-notification
primitives (eventfd, signalfd, timerfd, userfaultfd), yet fanotify_init
fell through to FamilyMisc by omission from the explicit family table -- an
alarm/adjtimex-style misclassification inconsistent with its siblings.
Add fanotify_init to the IPC family map and regenerate. Kind
(KindEventfd, flags at args[0]) and ret (UNCLASSIFIED, returned fd captured
via the fd mechanism) were already correct and are unchanged. fanotify_mark
stays in Misc (path-marking, not fd creation). Docs plan updated to keep
the docs-drift test in sync.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate')
| -rw-r--r-- | internal/generate/family.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/internal/generate/family.go b/internal/generate/family.go index 95b354b..a74f7a8 100644 --- a/internal/generate/family.go +++ b/internal/generate/family.go @@ -29,7 +29,20 @@ var syscallFamilies = map[string]SyscallFamily{ "setsockopt": FamilyNetwork, "shutdown": FamilyNetwork, "socket": FamilyNetwork, "socketpair": FamilyNetwork, "splice": FamilyNetwork, "tee": FamilyNetwork, - "eventfd": FamilyIPC, "eventfd2": FamilyIPC, "inotify_add_watch": FamilyIPC, + "eventfd": FamilyIPC, "eventfd2": FamilyIPC, + // fanotify_init(2) creates and initializes an fanotify notification group and + // returns an event-queue file descriptor — it is the direct analog of + // inotify_init1 (both are filesystem-event notification facilities whose + // group-creating syscall is a flags-taking fd-creator). inotify_init/ + // inotify_init1 are FamilyIPC alongside the other fd-based event-notification + // primitives (eventfd, signalfd, timerfd, userfaultfd), so fanotify_init + // belongs in IPC too rather than falling through to Misc by omission (an + // alarm/adjtimex-style misclassification). The flags argument is at args[0] + // (KindEventfd / eventfd flags capture) and the returned fd is captured via + // the fd mechanism, so the return is UNCLASSIFIED (not a byte count). + // fanotify_mark stays out of this table (path-marking, not fd creation). + "fanotify_init": FamilyIPC, + "inotify_add_watch": FamilyIPC, "inotify_init": FamilyIPC, "inotify_init1": FamilyIPC, "inotify_rm_watch": FamilyIPC, "memfd_create": FamilyIPC, "memfd_secret": FamilyIPC, "mq_getsetattr": FamilyIPC, "mq_notify": FamilyIPC, "mq_open": FamilyIPC, "mq_timedreceive": FamilyIPC, |
