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

     1  # Copyright 2019 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/ioctl.h>
     6  include <uapi/linux/watch_queue.h>
     7  
     8  resource fd_watch_queue[fd]
     9  
    10  pipe2$watch_queue(pipefd ptr[out, pipefd$watch_queue], flags const[O_NOTIFICATION_PIPE])
    11  read$watch_queue(fd fd_watch_queue, buf buffer[out], count len[buf])
    12  ioctl$IOC_WATCH_QUEUE_SET_SIZE(fd fd_watch_queue, cmd const[IOC_WATCH_QUEUE_SET_SIZE], arg flags[watch_queue_size])
    13  ioctl$IOC_WATCH_QUEUE_SET_FILTER(fd fd_watch_queue, cmd const[IOC_WATCH_QUEUE_SET_FILTER], arg ptr[in, watch_notification_filter])
    14  
    15  pipefd$watch_queue {
    16  	rfd	fd_watch_queue
    17  	wfd	fd
    18  }
    19  
    20  watch_notification_filter {
    21  	nr_filters	len[filters, int32]
    22  	__reserved	const[0, int32]
    23  	filters		array[watch_notification_type_filter]
    24  }
    25  
    26  watch_notification_type_filter {
    27  	type		int32
    28  	info_filter	int32
    29  	info_mask	int32
    30  	subtype_filter	array[int32, 8]
    31  }
    32  
    33  watch_queue_size = 1, 2, 4, 8, 16