github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/fanotify.txt (about)

     1  # Copyright 2015 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <linux/fcntl.h>
     5  include <linux/fanotify.h>
     6  
     7  resource fd_fanotify[fd]
     8  
     9  fanotify_init(flags flags[fanotify_flags], events flags[fanotify_events]) fd_fanotify
    10  fanotify_mark(fd fd_fanotify, flags flags[fanotify_mark], mask flags[fanotify_mask], fddir fd_dir, path ptr[in, filename])
    11  
    12  fanotify_flags = FAN_CLASS_PRE_CONTENT, FAN_CLASS_CONTENT, FAN_CLASS_NOTIF, FAN_CLOEXEC, FAN_NONBLOCK, FAN_UNLIMITED_QUEUE, FAN_UNLIMITED_MARKS, FAN_ENABLE_AUDIT
    13  # Not providing O_WRONLY means O_RDONLY.
    14  fanotify_events = O_WRONLY, O_RDWR, O_LARGEFILE, O_CLOEXEC, O_APPEND, O_DSYNC, O_NOATIME, O_NONBLOCK, O_SYNC
    15  fanotify_mark = FAN_MARK_ADD, FAN_MARK_REMOVE, FAN_MARK_FLUSH, FAN_MARK_DONT_FOLLOW, FAN_MARK_ONLYDIR, FAN_MARK_MOUNT, FAN_MARK_IGNORED_MASK, FAN_MARK_IGNORED_SURV_MODIFY, FAN_MARK_EVICTABLE, FAN_MARK_IGNORE, FAN_MARK_INODE
    16  fanotify_mask = FAN_ACCESS, FAN_MODIFY, FAN_CLOSE_WRITE, FAN_CLOSE_NOWRITE, FAN_OPEN, FAN_OPEN_EXEC, FAN_ONDIR, FAN_EVENT_ON_CHILD
    17  _ = FAN_OPEN_PERM, FAN_ACCESS_PERM, FAN_OPEN_EXEC_PERM