From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: + usb-core-kcov-collect-coverage-from-usb-complete-callback.patch added to -mm tree Date: Mon, 09 Mar 2020 16:37:59 -0700 Message-ID: <20200309233759.0ubiF8lW3%akpm@linux-foundation.org> References: <20200305222751.6d781a3f2802d79510941e4e@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.99]:44176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726937AbgCIXiA (ORCPT ); Mon, 9 Mar 2020 19:38:00 -0400 In-Reply-To: <20200305222751.6d781a3f2802d79510941e4e@linux-foundation.org> Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: andreyknvl@google.com, dvyukov@google.com, elver@google.com, gregkh@linuxfoundation.org, mm-commits@vger.kernel.org, stern@rowland.harvard.edu The patch titled Subject: usb: core: kcov: collect coverage from usb complete callback has been added to the -mm tree. Its filename is usb-core-kcov-collect-coverage-from-usb-complete-callback.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/usb-core-kcov-collect-coverage-from-usb-complete-callback.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/usb-core-kcov-collect-coverage-from-usb-complete-callback.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrey Konovalov Subject: usb: core: kcov: collect coverage from usb complete callback 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 syzkaller. Link: http://lkml.kernel.org/r/32bce32c8b88c2f88cd0a8acfcdb5d3a6e894632.1583778264.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Dmitry Vyukov Cc: Greg Kroah-Hartman Cc: Alan Stern Cc: Marco Elver Signed-off-by: Andrew Morton --- drivers/usb/core/hcd.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/core/hcd.c~usb-core-kcov-collect-coverage-from-usb-complete-callback +++ a/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(struc /* 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); _ Patches currently in -mm which might be from andreyknvl@google.com are kcov-cleanup-debug-messages.patch kcov-collect-coverage-from-interrupts.patch usb-core-kcov-collect-coverage-from-usb-complete-callback.patch