Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp323444ybh; Thu, 12 Mar 2020 02:40:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuUvr8xNf7bgN2V9O3A/DHGHD5WI2aOlnx9Bg7fXlcYcMwslZBEQ1nyRz/y9rzwPZvgLaEQ X-Received: by 2002:a05:6830:108d:: with SMTP id y13mr5730998oto.241.1584006027081; Thu, 12 Mar 2020 02:40:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1584006027; cv=pass; d=google.com; s=arc-20160816; b=dSzPV5ZsVduw608srXWDroLoO0HTryNBjh6prUIFmhc87KH5rP8fUGzxobkp/I6SO7 0XyGMlRWOI/DJHa+V2qHZht9c5zGuDHbJNC1+A+SUDmkATNrglcnR3fJbgzLehoaY1bc +kwj1a5h0QAZfmJnI13bb9iP89g+0OI+Qkz6wnAbWcYcJxMqbDo1A3jY5GCMyQyZFsTl olmRLNtLeZbW3lty4Jc6mZ1Y46jbS4RAdhDWOHsOLmv7/JwGPJYt1Dn4gaHrN0czUQIT YREh6L7WH3Wz8f7dB4vpamA/tVTOiYK8/R0SMJiukvYhLRmrRKeWToOo7A7ZwnmR3XRU vmQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=bRFdPejQLwGTMKiznfPHWuQAOKuKVH/W1TOCfX7AlFc=; b=RnADRi6YlmGmgjJrdv9b6WZ6fDu4SQiysWncaDvJbsyrVBr3nIjtraf3+78ZmrsLnd aKewyKptkcIADmgdXjQCYiqz79KjCZhflg0eZ0UzTHm27TkPxZj1QwX2paCXhiT95oku MFTBhg7iTqyoqRmTbEWuW0cyrlkXiKyQLLqBFQ54AHG2kNoeSK3x25eqXIAbsBBHVegr 8Wp0PeL4GFaT6NqXc1I/UAEo+sXFdTScSrWNNqYKWX3hmgXqxVxO2jpKY6JGnHXpuJp2 LlatAl6bxfsTz1mfvSDAhg0WCnHWF8wlPReVGB9GKI2U8UlsO0U4zU2Kp/60a86H66wF AD2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=qF34li1U; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l126si2419659oih.31.2020.03.12.02.40.14; Thu, 12 Mar 2020 02:40:27 -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=@nxp.com header.s=selector2 header.b=qF34li1U; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726591AbgCLJjW (ORCPT + 99 others); Thu, 12 Mar 2020 05:39:22 -0400 Received: from mail-eopbgr30088.outbound.protection.outlook.com ([40.107.3.88]:39298 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725268AbgCLJjV (ORCPT ); Thu, 12 Mar 2020 05:39:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dup/R+OGPYlgrXO2L35RYWWqReHmL+CBTtzsXhrldatBID8YkvQGJAITAYjnA5EMIek4eGMJqO42ovRx0TWXRkvP7/iBSsBZxT524H7Y2+24JGnG7wEipx01HBm78Y6k+09ZbMcn8MPQ/i869KX9I6AmQofVDVZ3typkL4/82O09lReywGYQ3iISKkfv0RimLZlFLF+jJZTpVY84+Yo+O5YIidmuX0r9j7TYUoPzRJ5tLFB3eSe951dpOwGEu51WF1ZXTcDbhdSEt909Ah2zT03coKxtcOMK3R2Nya5QZTXntBwQ4uxa4EEMt6gR14meULl0vG9YuP17FjDuBZv+Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bRFdPejQLwGTMKiznfPHWuQAOKuKVH/W1TOCfX7AlFc=; b=RhH7JXC51BLc7AddynwzrnChf7hDGuy3RzxujcnGqL9RMh45WYSE9M7YDhRkdSL4Gw4kRLEFbc+EfXqYdI37zhjNP2ngGN+cjAfSljFFfMMPXrUhlYaGfsAiINd2TUYkLspbj1B3Y2TBrGF/K/h44CnZesfbk0HC8ZgMv7TeMjPCsFhHWwgjsqjXABMjHRzpyH3g5QU1oJYHMORtCIVMABZq8oTq9PXnftsT5GlludBLRgKuVGLCUbp/j1vGZwGvKBnAiGer0+tTZ+Aw3avd6XwSPJ8LYhMFmT039tTxs1tdsm7OyI3ijk8CYyFtgsOJ/s3L+HXB5Iq5mdqyl4j9gA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bRFdPejQLwGTMKiznfPHWuQAOKuKVH/W1TOCfX7AlFc=; b=qF34li1UtfEqsExBUdip3fdshdmrzG64NTwziVXmXvQvctQABAZyiBw8rt7otzdVom1LcNdjv35PE46UtA16ydeF/90efBPBfBwx63zu1dQhn2RnK+bu6xl9rEuaYpW6RE7RT8NJ83QcEo/MUe1tOU01rCPC2rGTioYPeEmvAyo= Received: from VI1PR04MB5327.eurprd04.prod.outlook.com (20.177.51.23) by VI1PR04MB6989.eurprd04.prod.outlook.com (52.133.245.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.14; Thu, 12 Mar 2020 09:39:18 +0000 Received: from VI1PR04MB5327.eurprd04.prod.outlook.com ([fe80::9547:9dfa:76b8:71b1]) by VI1PR04MB5327.eurprd04.prod.outlook.com ([fe80::9547:9dfa:76b8:71b1%7]) with mapi id 15.20.2793.018; Thu, 12 Mar 2020 09:39:18 +0000 From: Peter Chen To: Andrey Konovalov CC: Dmitry Vyukov , Greg Kroah-Hartman , Alan Stern , Andrew Morton , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Alexander Potapenko , Marco Elver Subject: Re: [PATCH v2 3/3] usb: core: kcov: collect coverage from usb complete callback Thread-Topic: [PATCH v2 3/3] usb: core: kcov: collect coverage from usb complete callback Thread-Index: AQHV9kBk+9Olkm/+Q0G93rqDG1Hx5ahEt7UA Date: Thu, 12 Mar 2020 09:39:18 +0000 Message-ID: <20200312093920.GD14625@b29397-desktop> References: <32bce32c8b88c2f88cd0a8acfcdb5d3a6e894632.1583778264.git.andreyknvl@google.com> In-Reply-To: <32bce32c8b88c2f88cd0a8acfcdb5d3a6e894632.1583778264.git.andreyknvl@google.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=peter.chen@nxp.com; x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 23bfa394-3280-4c26-b793-08d7c6693c5b x-ms-traffictypediagnostic: VI1PR04MB6989: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0340850FCD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(4636009)(396003)(136003)(366004)(39860400002)(346002)(376002)(199004)(81166006)(33656002)(6506007)(53546011)(26005)(8676002)(71200400001)(478600001)(8936002)(76116006)(64756008)(66446008)(6916009)(91956017)(66556008)(186003)(66476007)(66946007)(1076003)(44832011)(4326008)(6486002)(81156014)(54906003)(86362001)(33716001)(2906002)(6512007)(316002)(5660300002)(9686003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB6989;H:VI1PR04MB5327.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RMR+53pAMUYDEqLa2DaBxgFlZ8/NUMmDpEZK2ZDm30SXovyPpSUnaq2F843x1pTGpeclpbyHqnVj69G0XYM/M8j5tPajs+UinnMh8ZXCR2eX9MRg1JZyoVNVhHXJAct+CTSdKuoEoThO3hhS2CKdIWiPS8xsJZvxF10gYKloAx2anQE/s7kCJmNxY4h5Dy15AENoWjbTuvjf+8lx3QsB56gsWTIh/7SeyisvyMO/eLcO+2Ecq2zALNX9C5i8vPhCXdQ0bpE452l3Mf/LlgM9cCvzY29prHczVVer9j++cgKKJl2ygE6OLWobY0297lBOLsHN8AzOx8kcg9eDa4x1VUwcdrujh82XdMhIIWjTjFm/hU7lmCJjTALhAmw1yLMC6tjQV0jo9i1FhC0j+CGjfIk71hthuRB2vMetyBkocJGsvSdiuJ2XdzaYINLYR7Gz x-ms-exchange-antispam-messagedata: tMoj06oxrrMgN6yuAKf1twlz9G4NbVIGQ9/G6G/A5lz9qq0ponJKc/MBL31onAAODzq3Q5i+kcSV3HjsTFdKVwlknvC/G4A6uSHgdfbCea0UiGQ8FF/wctzjidBzPkrl/iVLPt5QZeB4S1msrdiLXQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23bfa394-3280-4c26-b793-08d7c6693c5b X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2020 09:39:18.2174 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4X7SH65rutSxQRXDrd16OpFU9p2loxlHV+4Gu4hHvhLMkIC4jS20jJino/sNQmnQmeD6WpCkEFwsA9L81JtNaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6989 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" Peter > syzkaller. >=20 > Signed-off-by: Andrey Konovalov > --- > drivers/usb/core/hcd.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > 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 > =20 > #include > #include > @@ -1645,7 +1646,9 @@ static void __usb_hcd_giveback_urb(struct urb *urb) > =20 > /* pass ownership to the completion handler */ > urb->status =3D status; > + kcov_remote_start_usb((u64)urb->dev->bus->busnum); > urb->complete(urb); > + kcov_remote_stop(); > =20 > usb_anchor_resume_wakeups(anchor); > atomic_dec(&urb->use_count); > --=20 > 2.25.1.481.gfbce0eb801-goog >=20 --=20 Thanks, Peter Chen=