USB Raw Gadget (an interface that allows to emulate USB devices through the USB Gadget subsystem) has been merged into mainline: git.kernel.org/pub/scm/linux/
Conversation
Replying to
See more details and a usage example here:
1
4
Raw Gadget is what's been powering syzbot/syzkaller's fuzzing of the Linux kernel USB subsystem, with almost 200 bugs reported at this point: syzkaller.appspot.com/upstream?manag
1
5
13
Implemented a test suite for Raw Gadget, something that's rarely done for kernel interfaces:
github.com/xairy/raw-gadg
1
3
Replying to
wheee! I wonder whether it's possible to convince Android OEMs to start using that instead of hacking up their own kernel code for their weird custom file transfer USB gadgets...
2
1
5
Replying to
Awesome! is there something similar for emulating PCI devices? or is the PCI subsystem too low on the stack to do such a thing? I believe the only solutions i've seen are in the form of devices emulated through qemu
1
Replying to
There are hardware based solutions, but I'm not aware of any implemented solutions for emulating PCI devices within the kernel. Would love to know if something like this exists



