github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_input.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/input.h>
     5  
     6  resource fd_evdev[fd]
     7  
     8  # There seems to be nothing special we can do with this fd.
     9  syz_open_dev$mouse(dev ptr[in, string["/dev/input/mouse#"]], id intptr, flags flags[open_flags]) fd
    10  openat$mice(fd const[AT_FDCWD], file ptr[in, string["/dev/input/mice"]], flags flags[open_flags]) fd
    11  
    12  syz_open_dev$evdev(dev ptr[in, string["/dev/input/event#"]], id intptr, flags flags[open_flags]) fd_evdev
    13  
    14  write$evdev(fd fd_evdev, data ptr[in, array[input_event]], len bytesize[data])
    15  
    16  ioctl$EVIOCGVERSION(fd fd_evdev, cmd const[EVIOCGVERSION], arg buffer[out])
    17  ioctl$EVIOCGID(fd fd_evdev, cmd const[EVIOCGID], arg buffer[out])
    18  ioctl$EVIOCGREP(fd fd_evdev, cmd const[EVIOCGREP], arg buffer[out])
    19  ioctl$EVIOCGKEYCODE(fd fd_evdev, cmd const[EVIOCGKEYCODE], arg buffer[out])
    20  ioctl$EVIOCGKEYCODE_V2(fd fd_evdev, cmd const[EVIOCGKEYCODE_V2], arg buffer[out])
    21  ioctl$EVIOCGEFFECTS(fd fd_evdev, cmd const[EVIOCGEFFECTS], arg buffer[out])
    22  ioctl$EVIOCGMASK(fd fd_evdev, cmd const[EVIOCGMASK], arg ptr[in, input_mask])
    23  ioctl$EVIOCGNAME(fd fd_evdev, cmd const[EVIOCGNAME64], arg buffer[out])
    24  ioctl$EVIOCGPHYS(fd fd_evdev, cmd const[EVIOCGPHYS64], arg buffer[out])
    25  ioctl$EVIOCGUNIQ(fd fd_evdev, cmd const[EVIOCGUNIQ64], arg buffer[out])
    26  ioctl$EVIOCGPROP(fd fd_evdev, cmd const[EVIOCGPROP64], arg buffer[out])
    27  ioctl$EVIOCGMTSLOTS(fd fd_evdev, cmd const[EVIOCGMTSLOTS64], arg buffer[out])
    28  ioctl$EVIOCGKEY(fd fd_evdev, cmd const[EVIOCGKEY64], arg buffer[out])
    29  ioctl$EVIOCGLED(fd fd_evdev, cmd const[EVIOCGLED64], arg buffer[out])
    30  ioctl$EVIOCGSND(fd fd_evdev, cmd const[EVIOCGSND64], arg buffer[out])
    31  ioctl$EVIOCGSW(fd fd_evdev, cmd const[EVIOCGSW64], arg buffer[out])
    32  ioctl$EVIOCGBITKEY(fd fd_evdev, cmd const[EVIOCGBITKEY64], arg buffer[out])
    33  ioctl$EVIOCGBITSND(fd fd_evdev, cmd const[EVIOCGBITSND64], arg buffer[out])
    34  ioctl$EVIOCGBITSW(fd fd_evdev, cmd const[EVIOCGBITSW64], arg buffer[out])
    35  ioctl$EVIOCGABS0(fd fd_evdev, cmd const[EVIOCGABS0], arg buffer[out])
    36  ioctl$EVIOCGABS20(fd fd_evdev, cmd const[EVIOCGABS20], arg buffer[out])
    37  ioctl$EVIOCGABS2F(fd fd_evdev, cmd const[EVIOCGABS2F], arg buffer[out])
    38  ioctl$EVIOCGABS3F(fd fd_evdev, cmd const[EVIOCGABS3F], arg buffer[out])
    39  
    40  ioctl$EVIOCSREP(fd fd_evdev, cmd const[EVIOCSREP], arg ptr[in, array[int32, 2]])
    41  ioctl$EVIOCSKEYCODE(fd fd_evdev, cmd const[EVIOCSKEYCODE], arg ptr[in, array[int32, 2]])
    42  ioctl$EVIOCSKEYCODE_V2(fd fd_evdev, cmd const[EVIOCSKEYCODE_V2], arg ptr[in, input_keymap_entry])
    43  ioctl$EVIOCSFF(fd fd_evdev, cmd const[EVIOCSFF], arg ptr[in, ff_effect])
    44  ioctl$EVIOCRMFF(fd fd_evdev, cmd const[EVIOCRMFF], arg ptr[in, int32])
    45  ioctl$EVIOCGRAB(fd fd_evdev, cmd const[EVIOCGRAB], arg ptr[in, int32])
    46  ioctl$EVIOCREVOKE(fd fd_evdev, cmd const[EVIOCREVOKE], arg ptr[in, int32])
    47  ioctl$EVIOCSMASK(fd fd_evdev, cmd const[EVIOCSMASK], arg ptr[in, input_mask])
    48  ioctl$EVIOCSCLOCKID(fd fd_evdev, cmd const[EVIOCSCLOCKID], arg ptr[in, int32])
    49  ioctl$EVIOCSABS0(fd fd_evdev, cmd const[EVIOCSABS0], arg ptr[in, input_absinfo])
    50  ioctl$EVIOCSABS20(fd fd_evdev, cmd const[EVIOCSABS20], arg ptr[in, input_absinfo])
    51  ioctl$EVIOCSABS2F(fd fd_evdev, cmd const[EVIOCSABS2F], arg ptr[in, input_absinfo])
    52  ioctl$EVIOCSABS3F(fd fd_evdev, cmd const[EVIOCSABS3F], arg ptr[in, input_absinfo])
    53  
    54  ff_effect_type = FF_PERIODIC, FF_CONSTANT, FF_SPRING, FF_FRICTION, FF_DAMPER, FF_INERTIA, FF_RAMP
    55  ff_periodic_effect_wave = FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP, FF_SAW_DOWN, FF_CUSTOM
    56  input_codes = EV_SYN, EV_KEY, EV_REL, EV_ABS, EV_MSC, EV_SW, EV_LED, EV_SND, EV_REP, EV_FF, EV_PWR, EV_FF_STATUS, EV_MAX
    57  
    58  input_event {
    59  	time	timeval
    60  	type	flags[input_codes, int16]
    61  	code	int16
    62  	val	int32
    63  }
    64  
    65  input_keymap_entry {
    66  	flags	int8
    67  	len	int8[0:32]
    68  	index	int16
    69  	keycode	int32
    70  	scancod	array[int8, 32]
    71  }
    72  
    73  ff_effect {
    74  	type	flags[ff_effect_type, int16]
    75  	id	int16
    76  	dir	int16
    77  	trigger	ff_trigger
    78  	replay	ff_replay
    79  	u	ff_effect_u
    80  }
    81  
    82  ff_effect_u [
    83  	const	ff_constant_effect
    84  	ramp	ff_ramp_effect
    85  	period	ff_periodic_effect
    86  	cond	array[ff_condition_effect, 2]
    87  	rumble	ff_rumble_effect
    88  ]
    89  
    90  ff_trigger {
    91  	button	int16
    92  	interv	int16
    93  }
    94  
    95  ff_replay {
    96  	len	int16
    97  	delay	int16
    98  }
    99  
   100  ff_constant_effect {
   101  	level	int16
   102  	envelop	ff_envelope
   103  }
   104  
   105  ff_ramp_effect {
   106  	slevel	int16
   107  	elevel	int16
   108  	envelop	ff_envelope
   109  }
   110  
   111  ff_periodic_effect {
   112  	wave		flags[ff_periodic_effect_wave, int16]
   113  	period		int16
   114  	magnit		int16
   115  	offset		int16
   116  	phase		int16
   117  	envelope	ff_envelope
   118  	custom_len	len[custom_data, int32]
   119  	custom_data	ptr[in, array[int16]]
   120  }
   121  
   122  ff_condition_effect {
   123  	rsatur	int16
   124  	lsatur	int16
   125  	rcoeff	int16
   126  	lcoeff	int16
   127  	dead	int16
   128  	center	int16
   129  }
   130  
   131  ff_rumble_effect {
   132  	smagnit	int16
   133  	wmagnit	int16
   134  }
   135  
   136  ff_envelope {
   137  	len	int16
   138  	level	int16
   139  	flen	int16
   140  	flevel	int16
   141  }
   142  
   143  input_mask {
   144  	type	flags[input_codes, int32]
   145  	size	bytesize[ptr, int32]
   146  	ptr	ptr64[in, array[int8]]
   147  }
   148  
   149  input_absinfo {
   150  	val	int32
   151  	min	int32
   152  	max	int32
   153  	fuzz	int32
   154  	flag	int32
   155  	res	int32
   156  }
   157  
   158  define EVIOCGNAME64	EVIOCGNAME(64)
   159  define EVIOCGPHYS64	EVIOCGPHYS(64)
   160  define EVIOCGUNIQ64	EVIOCGUNIQ(64)
   161  define EVIOCGPROP64	EVIOCGPROP(64)
   162  define EVIOCGMTSLOTS64	EVIOCGMTSLOTS(64)
   163  define EVIOCGKEY64	EVIOCGKEY(64)
   164  define EVIOCGLED64	EVIOCGLED(64)
   165  define EVIOCGSND64	EVIOCGSND(64)
   166  define EVIOCGSW64	EVIOCGSW(64)
   167  define EVIOCGBITKEY64	EVIOCGBIT(EV_KEY, 64)
   168  define EVIOCGBITSND64	EVIOCGBIT(EV_SND, 64)
   169  define EVIOCGBITSW64	EVIOCGBIT(EV_SW, 64)
   170  define EVIOCGABS0	EVIOCGABS(0)
   171  define EVIOCGABS20	EVIOCGABS(0x20)
   172  define EVIOCGABS2F	EVIOCGABS(0x2F)
   173  define EVIOCGABS3F	EVIOCGABS(0x3F)
   174  define EVIOCSABS0	EVIOCSABS(0)
   175  define EVIOCSABS20	EVIOCSABS(0x20)
   176  define EVIOCSABS2F	EVIOCSABS(0x2F)
   177  define EVIOCSABS3F	EVIOCSABS(0x3F)