Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1818010ybh; Fri, 13 Mar 2020 07:58:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvSoGEPrewQHPzhD6UNdoN8p80rMpE1Sh+u5ouWGxF5WbMbP4OGs6srT0jws/3X98V38FQs X-Received: by 2002:a05:6808:8d0:: with SMTP id k16mr7412073oij.68.1584111508572; Fri, 13 Mar 2020 07:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584111508; cv=none; d=google.com; s=arc-20160816; b=1Ds9FQPcEimG0yAn2+FZ5+2oPuXWoPgTEl/uYJIlnjD2tzb0O0Tq1LdM/FEyrMuZ7r pKnBDXjKVH6/rOYQXggzEln4GY+xIW+rsZddr/8AhuT5lnL5DSoE2Cpx7dpDoabqU84s 9n7swUBig9K8p+N3vuIlaEbfdFAz4cezzAjjm5NEFnbtpAD0+k/tXUlvK1DYb4oQt8lR V69O6Ez90DrD7h1SkHr4oTWOZmWEnDiKaxmh64yXVKQPLk/0Y5AKjhKR+y0rZbelySnQ pMbZqAUbyn1zlIzUi7HNXXw49VirV9I4YKKgVCXpXCcrIo2tfCtBJ3vpTmJw4vcjK7T2 e7TQ== 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=p6VRmjxt/RLuEV3vnRanaLSMonZS+QrB7w914S386sk=; b=MZz6naBCk/6pOmb19vPwUNqVg7daPNNZK9JhnQCgNNYwzJZBB9pFC3snYPh6HI6iJm JRT8Oh7LFCztO0BT2Tg3zipY8p/ck/PumvXptlWBSAAyh1FNjucdp7Xgdkp05wIU+lCs Wg1q8qAYWmt0pNNycLrtKh+5k7dDwUmzWohkb292XURnnDJOZXQAT2M6HROANbBpsAw8 NctU1RsNLb/lGP6ATyJ5Qx9iOT5vZFYO3XGbJz+J0XDZY785eVBNI+jR1ebpTK5RYN31 lMy4fRPvxWxysqdflibpTHbiR1gag6W8LpRi/A+94EIfnQGcDeY8xCXAt29DN5+QF2up +F7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cx2qTH6s; 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 a11si4526714oib.154.2020.03.13.07.58.16; Fri, 13 Mar 2020 07:58:28 -0700 (PDT) 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=cx2qTH6s; 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 S1726836AbgCMO4t (ORCPT + 99 others); Fri, 13 Mar 2020 10:56:49 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37979 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726528AbgCMO4t (ORCPT ); Fri, 13 Mar 2020 10:56:49 -0400 Received: by mail-pl1-f195.google.com with SMTP id w3so4362588plz.5 for ; Fri, 13 Mar 2020 07:56:46 -0700 (PDT) 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=p6VRmjxt/RLuEV3vnRanaLSMonZS+QrB7w914S386sk=; b=cx2qTH6sC970pnUA6vaQYxDBliAsFLKpx5jgY/1l7mE1/koc3rjku94As1o/Q1Giwc lh5Ov0bnx2tmzuty4qSKnHAhRLLijzBjLNbfd92vBUi+Xo7SYQq5nLEu5pgYvkQQooir oDAN6iKicD+pDQoGrYezZSUB72PeP0bHomMLvT5TVYJL5ZAK5dLeSAL2MKOAJDcSyDlb 8F/+0XzLtjTWok0EoOeCCPMzMXcLjWsL8yuMLkIueMfM1vW0xVizPRB25FIiBz/DHe7M vf0nPC0/NxdiKx8RYjo11F2plWtpyA7aS2UTtn5PCKUIM5P96c+XNiFwvXayVNkWUQco D5/w== 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=p6VRmjxt/RLuEV3vnRanaLSMonZS+QrB7w914S386sk=; b=qtdJ5pY+gOgC4D+W/3wrLncgHsHO+6be6q9KdOkwCsBYQ+pCa+jtjXfVbiwj7w3jzS stcUm+6U9O0fgZ+BfFCFAA96xbuYhEgap6meQrfXsAkajZpPMthHZvXAdk1pMIJ7qtbw Sry6lZqt2emIBV+3y0Tkhr7j2MN62SSEenqMLy6Wb6chwJ8TQSHVQq20Dc6ZxyoqA/fH jRruj7o5suwIBg9zKf0mEX9JS5RGvrGcmG78mxvbMKfMUMq8BakC66nULl9BAGyV6p4h eReB9z6lTvsMSwriusYp1kwj7wWGNLnEk1wxCEUEcPOfPTThJk41uzR/ZioIYksvWFrg MOLg== X-Gm-Message-State: ANhLgQ3LesKn188RpVG+eHzNbTM2lSr/H8wyX0z8CTzNMPqBjgPE3PiN enMxKBg6S2zX3KdkekAmojGwfJWJ42dM8T8WSytzYQ== X-Received: by 2002:a17:902:8492:: with SMTP id c18mr14107191plo.147.1584111406059; Fri, 13 Mar 2020 07:56:46 -0700 (PDT) MIME-Version: 1.0 References: <32bce32c8b88c2f88cd0a8acfcdb5d3a6e894632.1583778264.git.andreyknvl@google.com> <20200312093920.GD14625@b29397-desktop> In-Reply-To: <20200312093920.GD14625@b29397-desktop> From: Andrey Konovalov Date: Fri, 13 Mar 2020 15:56:35 +0100 Message-ID: Subject: Re: [PATCH v2 3/3] usb: core: kcov: collect coverage from usb complete callback To: Peter Chen Cc: Dmitry Vyukov , Greg Kroah-Hartman , Alan Stern , Andrew Morton , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , 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 Thu, Mar 12, 2020 at 10:39 AM Peter Chen wrote: > > On 20-03-09 19:27:06, Andrey Konovalov wrote: > > This patch adds kcov_remote_start/stop() callbacks around the urb > > complete() callback that is executed in softirq context when dummy_hcd > > is in use. As the result, kcov can be used to collect coverage from those > > those callbacks, which is used to facilitate coverage-guided fuzzing with > > Typo, One more "those" Will fix in v3, thanks Peter! > > Peter > > > syzkaller. > > > > Signed-off-by: Andrey Konovalov > > --- > > drivers/usb/core/hcd.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > > index aa45840d8273..de624c47e190 100644 > > --- a/drivers/usb/core/hcd.c > > +++ b/drivers/usb/core/hcd.c > > @@ -31,6 +31,7 @@ > > #include > > #include > > #include > > +#include > > > > #include > > #include > > @@ -1645,7 +1646,9 @@ static void __usb_hcd_giveback_urb(struct urb *urb) > > > > /* pass ownership to the completion handler */ > > urb->status = status; > > + kcov_remote_start_usb((u64)urb->dev->bus->busnum); > > urb->complete(urb); > > + kcov_remote_stop(); > > > > usb_anchor_resume_wakeups(anchor); > > atomic_dec(&urb->use_count); > > -- > > 2.25.1.481.gfbce0eb801-goog > > > > -- > > Thanks, > Peter Chen