linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Exporting USB device ids from the kernel
@ 2019-11-15 14:25 Andrey Konovalov
  2019-11-15 15:06 ` Greg Kroah-Hartman
  2019-11-15 15:44 ` Alan Stern
  0 siblings, 2 replies; 15+ messages in thread
From: Andrey Konovalov @ 2019-11-15 14:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern; +Cc: USB list, Dmitry Vyukov

Hi Greg and Alan,

For USB fuzzing it would be nice to be able to export usb_device_id
structs from the kernel to facilitate the fuzzer with generating USB
descriptors that match to actual drivers. The same is required for
hid_device_id structs, since those are matched separately by the
usbhid driver (are there other cases like this?).

Currently I have a hacky patch [1] that walks all drivers for USB and
HID buses and then prints all device ids for those drivers into the
kernel log. Those are manually parsed and built into the fuzzer [2]
and then used to generate USB descriptors [3].

I'm thinking of making a proper patch that will add a debugfs entry
like usb/drivers (and usb/hid_drivers?), that can be read to get
USB/HID device ids for all loaded drivers. Would that be acceptable?
Or should I use some other interface to do that?

Thanks!

[1] https://github.com/google/syzkaller/blob/master/tools/syz-usbgen/usb_ids.patch
[2] https://github.com/google/syzkaller/blob/master/sys/linux/init_vusb_ids.go
[3] https://github.com/google/syzkaller/blob/master/sys/linux/init_vusb.go

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-01-13 14:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 14:25 Exporting USB device ids from the kernel Andrey Konovalov
2019-11-15 15:06 ` Greg Kroah-Hartman
2019-11-15 15:13   ` Andrey Konovalov
2019-11-15 15:30     ` Greg Kroah-Hartman
2019-11-15 15:44 ` Alan Stern
2019-11-15 16:10   ` Andrey Konovalov
2019-11-16  8:48     ` Greg Kroah-Hartman
2019-11-18 16:12       ` Andrey Konovalov
2019-11-18 16:39         ` Greg Kroah-Hartman
2019-11-18 17:42           ` Andrey Konovalov
2019-11-18 17:57             ` Greg Kroah-Hartman
2019-12-02 16:19               ` Andrey Konovalov
2019-12-02 16:49                 ` Greg Kroah-Hartman
2019-12-03 13:47                   ` Andrey Konovalov
2020-01-13 14:48               ` Andrey Konovalov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).