Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3118492ybx; Fri, 8 Nov 2019 14:20:09 -0800 (PST) X-Google-Smtp-Source: APXvYqyH5tzqxD165ZNcxhJXjJX43cVHgJ+uDAkyF5V3Gyw/2LUHe55MJU+WA9E2cgPjGGYPTo5s X-Received: by 2002:a17:906:5044:: with SMTP id e4mr11407151ejk.27.1573251609856; Fri, 08 Nov 2019 14:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573251609; cv=none; d=google.com; s=arc-20160816; b=VXA3WQQxpup/mIqKHzYKoBjHfP/eGbMaKWy+vGnWJIflDSEEeDLUoR88p5a1NCV1z2 KvxcPffmxHvXLbZUyXQr/+WQrsvyo+iUu48/sQo3gqzuTF5//Q5KnJiKHB11MFMiHmV7 bSJl2BsX0hyBBEhwZ6bJHIdQWhCSAcgBQwLwrYZb8MhvREo24WeczE3EtAm11QqYicng jEDVinUR1J4FvMoo6l4nq3zoC7DSt7wKQsVxb5qdedEHdqIV+4DGnxrq2TFuM2j1//IA qNlTqzG6ShDsk389VAs4ro1WOZDs6J8k9LqFmGizkZ2DIGabSAnLjVuwYOHObvusjUVI Wohg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7IqcEdYpIhKi7OhB48nFEV4cOEv0bt3kSka2RQuhHz8=; b=doTAGNFDqcESTTaIMMxqkhJb0MoM9MgMc4llGCkeWfVgwK/tNCNg9hvjtEEZuHB+wr fq9mEg6/351lcTTzOTAv4zpUtAJ75zKJT9K1ymxKk/Dnj45iGF32nI/3hFrw80r3yAzx gf9/hjl5h1lxt0R+Cili+uO9A960TrWH+VSxBnGPWI9KBcnfO0xcmHPfxNq17u/83BAy YvuPm47W+VrtD09yN8GFoqQjKPDZfqXMMHwAu9ISwZyej2ERNVzOkLZT7k39H5u+mtTI f1u6iBZLjBtT+pHqmaNZUCxCcfZuDAA+cPrsmV9LzYr3RitIYCWifgpaYAcW0Kx5RVr5 yf0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TwbUgVQW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w25si5143848edl.418.2019.11.08.14.19.46; Fri, 08 Nov 2019 14:20:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TwbUgVQW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730994AbfKHWSv (ORCPT + 99 others); Fri, 8 Nov 2019 17:18:51 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45525 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbfKHWSv (ORCPT ); Fri, 8 Nov 2019 17:18:51 -0500 Received: by mail-pg1-f194.google.com with SMTP id w11so4852105pga.12 for ; Fri, 08 Nov 2019 14:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7IqcEdYpIhKi7OhB48nFEV4cOEv0bt3kSka2RQuhHz8=; b=TwbUgVQWwmE9El4cplMMqkhD6lFeocES3EUaM4ERY+x67cSpXlpUv0iPKzXbSuwJWv m+j1IRJnoXZl66UtGaV7D2vEt5/G19fT1Qri0hTubfAKw1Sn/19KXh6eOskZM4yRwdLa Eg+P2n6vrhkm1ROMj9E7U4NZu620y1DJGNS/ZeMzJInzmu0ciIAAf5w8pZKOyT3m95W9 5GJ3831+TWQJmCCsY7CprfqE+476rujpBTIEAa/Ma7rDb2LwnkWD0+wUGkweH7UO9sh2 AaJMfiyFIS2nW1u2fIP5eXA7g3IU1GyvDEltuUdVWjsmIDsUyhSgbHT8AwKac/YMlBBm 4nTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7IqcEdYpIhKi7OhB48nFEV4cOEv0bt3kSka2RQuhHz8=; b=n1LWxQNghbNIXadMEcVln2Y3AJXUr+otYiwh6MhBHBQd9cswuQtZK8MNsA2CnM3tkJ usDLl6lME1sdpyVDqo7hXAb4SfKvkUakb/Z/utQwRMru/ad+T7/T1+PyyAQWeNpv3t0C qi3/j2dKJ+sucWtCqrqS5g4tTPiIU8MBHjwlo+uYOGuOGsNjueX0RT1VDn0V173tePx9 cHFJ2lt0AdiFakJg+H+a+g8bpSGgr7LF1Kq9xvA9HGW39GLdEuo5883UVuiOc11ecRPy KrxPSqby3EdwvxsbtlGvpCEAFLor7YbLFjWr1U/l2J6bdSmKv0dOT5YXzAcQA3l2fyyu LWvQ== X-Gm-Message-State: APjAAAU2LrJ5QrOeSJVL7C4/2JWxkMqnk5MHbQLI2YEc95T86usyVU7K p+Yuw821vG9/QA4F1Rw/D4vcbcGsbOGgKgXSIdZc9Q== X-Received: by 2002:a17:90a:35d0:: with SMTP id r74mr16848412pjb.47.1573251530363; Fri, 08 Nov 2019 14:18:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Fri, 8 Nov 2019 23:18:39 +0100 Message-ID: Subject: Re: [PATCH 0/1] usb: gadget: add raw-gadget interface To: Alan Stern Cc: USB list , LKML , Greg Kroah-Hartman , Jonathan Corbet , Felipe Balbi , Dmitry Vyukov , Alexander Potapenko , Marco Elver Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 8, 2019 at 10:45 PM Alan Stern wrote: > > On Fri, 8 Nov 2019, Andrey Konovalov wrote: > > > This patchset (currently a single patch) adds a new userspace interface > > for the USB Gadget subsystem called USB Raw Gadget (I don't mind changing > > the name to something else if there are better ideas). This is what > > currently being used to enable coverage-buided USB fuzzing with syzkaller: > > > > https://github.com/google/syzkaller/blob/master/docs/linux/external_fuzzing_usb.md > > > > Initially I was using GadgetFS (together with the Dummy HCD/UDC module) > > to perform emulation of USB devices for fuzzing, but later switched to a > > custom written interface. The incentive to implement a different interface > > was to provide a somewhat raw and direct access to the USB Gadget layer > > for the userspace, where every USB request is passed to the userspace to > > get a response. See documentation for the list of differences between > > Raw Gadget and GadgetFS. > > > > This patchset has been pushed to the public Linux kernel Gerrit instance: > > > > https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/2144 > > > > Andrey Konovalov (1): > > usb: gadget: add raw-gadget interface > > > > Documentation/usb/index.rst | 1 + > > Documentation/usb/raw-gadget.rst | 60 ++ > > drivers/usb/gadget/Kconfig | 9 + > > drivers/usb/gadget/Makefile | 2 + > > drivers/usb/gadget/raw.c | 1150 +++++++++++++++++++++++++++ > > As a general rule, gadget drivers don't go directly in > drivers/usb/gadget. raw.c counts as a legacy driver (because it's not > written to use the composite gadget framework), so it belongs in > drivers/usb/gadget/legacy. That's where the gadgetfs driver lives, for > example. Hi Alan! Sure, I'll move it to legacy/ in v2. Thanks!