bisecting cause commit starting from 614124bea77e452aa6df7a8714e8bc820b489922 building syzkaller on e59537be40a9ad863e953e187c14dbde57caf1b1 testing commit 614124bea77e452aa6df7a8714e8bc820b489922 with gcc (GCC) 10.2.1 20210217 kernel signature: c83abe1efc5170f17dc13d85c2aa6e9d5abc4c495911029397a1ed0541e8294a all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing release v5.12 testing commit 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 with gcc (GCC) 10.2.1 20210217 kernel signature: d440b4cda7d2ab4e7a9fb717e84bf516b6131e0226170a2accac2a704eba3a26 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing release v5.11 testing commit f40ddce88593482919761f74910f42f4b84c004b with gcc (GCC) 10.2.1 20210217 kernel signature: 765cd1540c326c0950c950fbd0fec8db62a5661f5639cb7fd27d9b0db4d90c60 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing release v5.10 testing commit 2c85ebc57b3e1817b6ce1a6b703928e113a90442 with gcc (GCC) 10.2.1 20210217 kernel signature: df7feb4d91f8944dbc6f04c6ce0d62cee0e23c247a3d664c8d09e4380a1d4db4 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing release v5.9 testing commit bbf5c979011a099af5dc76498918ed7df445635b with gcc (GCC) 10.2.1 20210217 kernel signature: 729377365c17b92d66ed1bdf532053d69e13d473b5ea80ef6b5eacb7eb88528b all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing release v5.8 testing commit bcf876870b95592b52519ed4aafcf9d95999bc9c with gcc (GCC) 8.4.1 20210217 kernel signature: fe4cf10963fe22623041f7dd2621a870da3a6c1c0337ee4720a2074a1ed96570 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing release v5.7 testing commit 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 with gcc (GCC) 8.4.1 20210217 kernel signature: 2c6056a2dfdd16b432db0590dcf44d9466ab6d94a2975fdc54052aff1a1c3cf4 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb testing release v5.6 testing commit 7111951b8d4973bda27ff663f2cf18b663d15b48 with gcc (GCC) 8.4.1 20210217 kernel signature: 3e55c7c138041a575a7239b7dc3aeb1b6aecc1db234951c50f555812908a4b2a run #0: OK run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: boot failed: can't ssh into the instance # git bisect start 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 7111951b8d4973bda27ff663f2cf18b663d15b48 Bisecting: 7542 revisions left to test after this (roughly 13 steps) [50a5de895dbe5df947b3a695777db5b2c313e065] Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma testing commit 50a5de895dbe5df947b3a695777db5b2c313e065 with gcc (GCC) 8.4.1 20210217 kernel signature: d5f4d81b23e95f18faadcc720741b77c66489cbf2e05f8b28565d2c7c51e5314 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad 50a5de895dbe5df947b3a695777db5b2c313e065 Bisecting: 4204 revisions left to test after this (roughly 12 steps) [56a451b780676bc1cdac011735fe2869fa2e9abf] Merge tag 'ntb-5.7' of git://github.com/jonmason/ntb testing commit 56a451b780676bc1cdac011735fe2869fa2e9abf with gcc (GCC) 8.4.1 20210217 kernel signature: ffc7280f4a3b228a71843faed3b4a8aa6b49e90b816029334bd8c797a4900326 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad 56a451b780676bc1cdac011735fe2869fa2e9abf Bisecting: 1643 revisions left to test after this (roughly 11 steps) [49835c15a55225e9b3ff9cc9317135b334ea2d49] Merge tag 'pm-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm testing commit 49835c15a55225e9b3ff9cc9317135b334ea2d49 with gcc (GCC) 8.4.1 20210217 kernel signature: 41978dd5cf4c767d835e0096ff02ffd103ca1c2ba755b57377469bc7633a4cba all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad 49835c15a55225e9b3ff9cc9317135b334ea2d49 Bisecting: 934 revisions left to test after this (roughly 10 steps) [063d1942247668eb0bb800aef5afbbef337344be] Merge tag 'media/v5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media testing commit 063d1942247668eb0bb800aef5afbbef337344be with gcc (GCC) 8.4.1 20210217 kernel signature: 8842be13eb075fe52153fa6d4225ac715e0368d5f881b8296dbff0e4addb8615 all runs: OK # git bisect good 063d1942247668eb0bb800aef5afbbef337344be Bisecting: 516 revisions left to test after this (roughly 9 steps) [e681bb287f40e7a9dbcb04cef80fd87a2511ab86] staging: vt6656: Use DIV_ROUND_UP macro instead of specific code testing commit e681bb287f40e7a9dbcb04cef80fd87a2511ab86 with gcc (GCC) 8.4.1 20210217 kernel signature: 90af3d910531ae36759570bae4e6d753dd13d94af578637a48f7d19fc3ed0763 all runs: OK # git bisect good e681bb287f40e7a9dbcb04cef80fd87a2511ab86 Bisecting: 266 revisions left to test after this (roughly 8 steps) [db34c5ffee649e2c4c870d1031a996398a187cf5] Merge tag 'usb-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb testing commit db34c5ffee649e2c4c870d1031a996398a187cf5 with gcc (GCC) 8.4.1 20210217 kernel signature: bd792a50b39787300292b272dd53b9bb7cda0abb488087a5e202b39cf4fe16cd all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad db34c5ffee649e2c4c870d1031a996398a187cf5 Bisecting: 121 revisions left to test after this (roughly 7 steps) [a8ab3e76297ea85d92f4ee0833bd469816a13ccf] Merge tag 'usb-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next testing commit a8ab3e76297ea85d92f4ee0833bd469816a13ccf with gcc (GCC) 8.4.1 20210217 kernel signature: 6bfc6704aa5ef96c66331c73890cfeb9c96160ddf15e5b5b22b29a6a2ad20f71 all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad a8ab3e76297ea85d92f4ee0833bd469816a13ccf Bisecting: 63 revisions left to test after this (roughly 6 steps) [d1c6a769cdf466053ae211789f2b0671c8a72331] usb: typec: mux: Allow the mux handles to be requested with fwnode testing commit d1c6a769cdf466053ae211789f2b0671c8a72331 with gcc (GCC) 8.4.1 20210217 kernel signature: d774fd58598d66d625069c71623dbeccd9b4c9535b2cbc6adf0726771c7bfbec all runs: OK # git bisect good d1c6a769cdf466053ae211789f2b0671c8a72331 Bisecting: 31 revisions left to test after this (roughly 5 steps) [eeead847487f726fa177d0f4060c4f0816ad9cd9] usb: gadget: amd5536udc: fix spelling mistake "reserverd" -> "reserved" testing commit eeead847487f726fa177d0f4060c4f0816ad9cd9 with gcc (GCC) 8.4.1 20210217 kernel signature: 58bbaaca7abf76c642414e779af97819c304f91a61386f384840d0d6451d897e all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad eeead847487f726fa177d0f4060c4f0816ad9cd9 Bisecting: 15 revisions left to test after this (roughly 4 steps) [3d157c28d2289edf0439e8308e8de3a06acaaf0e] doc: dt: bindings: usb: dwc3: Update entries for disabling SS instances in park mode testing commit 3d157c28d2289edf0439e8308e8de3a06acaaf0e with gcc (GCC) 8.4.1 20210217 kernel signature: 1d62b86df0e93a136a36493170c35899654afa0a4f635f6d9c559933d5c49120 run #0: OK run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: boot failed: can't ssh into the instance # git bisect good 3d157c28d2289edf0439e8308e8de3a06acaaf0e Bisecting: 7 revisions left to test after this (roughly 3 steps) [0227cc84c44417a29c8102e41db8ec2c11ebc6b2] usb: dwc3: core: don't do suspend for device mode if already suspended testing commit 0227cc84c44417a29c8102e41db8ec2c11ebc6b2 with gcc (GCC) 8.4.1 20210217 kernel signature: e69142b9cda635a2873d5f48e1e8aad2274f0dfa1e42f4b39a38df5b7301c780 run #0: OK run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: boot failed: can't ssh into the instance # git bisect good 0227cc84c44417a29c8102e41db8ec2c11ebc6b2 Bisecting: 3 revisions left to test after this (roughly 2 steps) [95b18f28979e12539cc02f6ec4e2c776e8551f39] dt-bindings: usb: dwc2: add compatible property for rk3328 usb testing commit 95b18f28979e12539cc02f6ec4e2c776e8551f39 with gcc (GCC) 8.4.1 20210217 kernel signature: 50a371809a5019b3804b6bf3b90802be70a1ac20b93ab74b98695528049b0c5b all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad 95b18f28979e12539cc02f6ec4e2c776e8551f39 Bisecting: 1 revision left to test after this (roughly 1 step) [1a0808cb9e417170ed6ab97254cf319dc3e3c310] usb: dwc2: Implement set_selfpowered() testing commit 1a0808cb9e417170ed6ab97254cf319dc3e3c310 with gcc (GCC) 8.4.1 20210217 kernel signature: e69142b9cda635a2873d5f48e1e8aad2274f0dfa1e42f4b39a38df5b7301c780 all runs: OK # git bisect good 1a0808cb9e417170ed6ab97254cf319dc3e3c310 Bisecting: 0 revisions left to test after this (roughly 0 steps) [f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10] usb: gadget: add raw-gadget interface testing commit f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10 with gcc (GCC) 8.4.1 20210217 kernel signature: 50a371809a5019b3804b6bf3b90802be70a1ac20b93ab74b98695528049b0c5b all runs: crashed: WARNING in vmk80xx_auto_attach/usb_submit_urb # git bisect bad f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10 f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10 is the first bad commit commit f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10 Author: Andrey Konovalov Date: Mon Feb 24 17:13:03 2020 +0100 usb: gadget: add raw-gadget interface USB Raw Gadget is a kernel module that provides a userspace interface for the USB Gadget subsystem. Essentially it allows to emulate USB devices from userspace. Enabled with CONFIG_USB_RAW_GADGET. Raw Gadget is currently a strictly debugging feature and shouldn't be used in production. Raw Gadget is similar to GadgetFS, but provides a more low-level and direct access to the USB Gadget layer for the userspace. The key differences are: 1. Every USB request is passed to the userspace to get a response, while GadgetFS responds to some USB requests internally based on the provided descriptors. However note, that the UDC driver might respond to some requests on its own and never forward them to the Gadget layer. 2. GadgetFS performs some sanity checks on the provided USB descriptors, while Raw Gadget allows you to provide arbitrary data as responses to USB requests. 3. Raw Gadget provides a way to select a UDC device/driver to bind to, while GadgetFS currently binds to the first available UDC. 4. Raw Gadget uses predictable endpoint names (handles) across different UDCs (as long as UDCs have enough endpoints of each required transfer type). 5. Raw Gadget has ioctl-based interface instead of a filesystem-based one. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andrey Konovalov Signed-off-by: Felipe Balbi Documentation/usb/index.rst | 1 + Documentation/usb/raw-gadget.rst | 61 ++ drivers/usb/gadget/legacy/Kconfig | 11 + drivers/usb/gadget/legacy/Makefile | 1 + drivers/usb/gadget/legacy/raw_gadget.c | 1078 ++++++++++++++++++++++++++++++++ include/uapi/linux/usb/raw_gadget.h | 167 +++++ 6 files changed, 1319 insertions(+) create mode 100644 Documentation/usb/raw-gadget.rst create mode 100644 drivers/usb/gadget/legacy/raw_gadget.c create mode 100644 include/uapi/linux/usb/raw_gadget.h culprit signature: 50a371809a5019b3804b6bf3b90802be70a1ac20b93ab74b98695528049b0c5b parent signature: e69142b9cda635a2873d5f48e1e8aad2274f0dfa1e42f4b39a38df5b7301c780 revisions tested: 22, total time: 4h51m49.421077206s (build: 2h54m11.189770852s, test: 1h54m41.6702259s) first bad commit: f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10 usb: gadget: add raw-gadget interface recipients (to): ["andreyknvl@google.com" "balbi@kernel.org" "gregkh@linuxfoundation.org"] recipients (cc): [] crash: WARNING in vmk80xx_auto_attach/usb_submit_urb ------------[ cut here ]------------ usb 3-1: BOGUS urb xfer, pipe 1 != type 3 WARNING: CPU: 1 PID: 3496 at drivers/usb/core/urb.c:479 usb_submit_urb+0x8c2/0x11a0 drivers/usb/core/urb.c:478 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 3496 Comm: kworker/1:5 Not tainted 5.6.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x96/0xe0 lib/dump_stack.c:118 panic+0x2a1/0x52a kernel/panic.c:221 __warn.cold.10+0x25/0x2f kernel/panic.c:582 report_bug+0x1aa/0x260 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:174 [inline] fixup_bug arch/x86/kernel/traps.c:169 [inline] do_error_trap+0x12d/0x1e0 arch/x86/kernel/traps.c:267 do_invalid_op+0x31/0x40 arch/x86/kernel/traps.c:286 invalid_op+0x2d/0x40 arch/x86/entry/entry_64.S:1027 RIP: 0010:usb_submit_urb+0x8c2/0x11a0 drivers/usb/core/urb.c:478 Code: 02 00 00 48 89 c7 48 89 54 24 10 e8 78 d3 26 ff 48 8b 54 24 10 45 89 f0 44 89 e9 48 89 c6 48 c7 c7 e0 91 f4 88 e8 da 68 70 fc <0f> 0b 80 fb 01 41 be 86 03 00 00 74 1b 84 db 0f 84 ac 01 00 00 83 RSP: 0018:ffffc900022ff050 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff89deafc8 RDI: ffffffff8e4db220 RBP: ffff88808688af5c R08: ffffed10173e6479 R09: ffffed10173e6479 R10: ffffed10173e6478 R11: ffff8880b9f323c7 R12: ffff88808688af00 R13: 0000000000000001 R14: 0000000000000003 R15: ffff8880a3184000 usb_start_wait_urb+0xf9/0x490 drivers/usb/core/message.c:57 vmk80xx_reset_device drivers/staging/comedi/drivers/vmk80xx.c:226 [inline] vmk80xx_auto_attach+0x12ce/0x18a0 drivers/staging/comedi/drivers/vmk80xx.c:814 comedi_auto_config+0x13f/0x370 drivers/staging/comedi/drivers.c:1067 usb_probe_interface+0x277/0x840 drivers/usb/core/driver.c:361 really_probe+0x20b/0xb00 drivers/base/dd.c:551 driver_probe_device+0x259/0x370 drivers/base/dd.c:724 bus_for_each_drv+0x118/0x1b0 drivers/base/bus.c:431 __device_attach+0x1be/0x2e0 drivers/base/dd.c:897 bus_probe_device+0x19e/0x250 drivers/base/bus.c:491 device_add+0x10f7/0x1920 drivers/base/core.c:2500 usb_set_configuration+0xc81/0x1940 drivers/usb/core/message.c:2023 generic_probe+0x61/0x8a drivers/usb/core/generic.c:210 really_probe+0x20b/0xb00 drivers/base/dd.c:551 driver_probe_device+0x259/0x370 drivers/base/dd.c:724 bus_for_each_drv+0x118/0x1b0 drivers/base/bus.c:431 __device_attach+0x1be/0x2e0 drivers/base/dd.c:897 bus_probe_device+0x19e/0x250 drivers/base/bus.c:491 device_add+0x10f7/0x1920 drivers/base/core.c:2500 usb_new_device+0x866/0x14e0 drivers/usb/core/hub.c:2548 hub_port_connect drivers/usb/core/hub.c:5195 [inline] hub_port_connect_change drivers/usb/core/hub.c:5335 [inline] port_event drivers/usb/core/hub.c:5481 [inline] hub_event+0x1079/0x3240 drivers/usb/core/hub.c:5563 process_one_work+0x8ff/0x1690 kernel/workqueue.c:2264 worker_thread+0x82/0xb50 kernel/workqueue.c:2410 kthread+0x31d/0x3e0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Kernel Offset: disabled Rebooting in 86400 seconds..