github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_hidraw.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 <uapi/linux/hidraw.h> 5 6 resource fd_hidraw[fd] 7 8 syz_open_dev$hidraw(dev ptr[in, string["/dev/hidraw#"]], id intptr, flags flags[open_flags]) fd_hidraw 9 10 # TODO: binary format (see https://elixir.bootlin.com/linux/v5.1.7/source/drivers/hid/hidraw.c#L111) 11 write$hidraw(fd fd_hidraw, data buffer[in], len bytesize[data]) 12 read$hidraw(fd fd_hidraw, data buffer[out], len bytesize[data]) 13 14 # https://elixir.bootlin.com/linux/v5.1.7/source/include/uapi/linux/hidraw.h#L34 15 ioctl$HIDIOCGRDESCSIZE(fd fd_hidraw, cmd const[HIDIOCGRDESCSIZE], arg ptr[out, int32]) 16 ioctl$HIDIOCGRDESC(fd fd_hidraw, cmd const[HIDIOCGRDESC], arg ptr[inout, hidraw_report_descriptor]) 17 ioctl$HIDIOCGRAWINFO(fd fd_hidraw, cmd const[HIDIOCGRAWINFO], arg buffer[out]) 18 ioctl$HIDIOCGRAWNAME(fd fd_hidraw, cmd const[HIDIOCGRAWNAME64], arg ptr[out, array[int8, 64]]) 19 ioctl$HIDIOCGRAWPHYS(fd fd_hidraw, cmd const[HIDIOCGRAWPHYS64], arg ptr[out, array[int8, 64]]) 20 # TODO: binary format (see https://elixir.bootlin.com/linux/v5.1.7/source/drivers/hid/hidraw.c#L111) 21 ioctl$HIDIOCSFEATURE(fd fd_hidraw, cmd const[HIDIOCSFEATURE64], arg buffer[in]) 22 ioctl$HIDIOCGFEATURE(fd fd_hidraw, cmd const[HIDIOCGFEATURE64], arg ptr[inout, hidraw_get_report_arg]) 23 24 hidraw_report_descriptor { 25 size bytesize[value, int32] 26 value array[int8, 0:HID_MAX_DESCRIPTOR_SIZE] 27 } 28 29 hidraw_get_report_arg { 30 report_number int8 31 report array[int8, 64] 32 } [packed] 33 34 define HIDIOCGRAWNAME64 HIDIOCGRAWNAME(64) 35 define HIDIOCGRAWPHYS64 HIDIOCGRAWPHYS(64) 36 define HIDIOCSFEATURE64 HIDIOCSFEATURE(64) 37 define HIDIOCGFEATURE64 HIDIOCGFEATURE(64)