xairy / raw-gadget

USB Raw Gadget — a low-level interface for the Linux USB Gadget subsystem
364 stars 40 forks source link

Support O_NONBLOCK I/O #59

Open xairy opened 1 year ago

xairy commented 1 year ago

Right now, every Raw Gadget endpoint read/write ioctl submits a USB request and waits until its completion. This is done deliberately to assist with coverage-guided fuzzing by having a single syscall fully process a single USB request.

However, for other use cases, we might want to have a non-blocking operation mode, where Raw Gadget would not wait until the completion of each USB request. The original blocking mode must still be kept in the implementation.

This issue is also mentioned in the kernel documentation.

ReaganDun commented 3 weeks ago

want a non-blocking USB_RAW_IOCTL_EVENT_FETCH so badly😭