From: Andrey Konovalov <andreyknvl@google.com>
To: Dmitry Vyukov <dvyukov@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
USB list <linux-usb@vger.kernel.org>,
linux-input@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Alexander Potapenko <glider@google.com>,
Marco Elver <elver@google.com>
Subject: Re: [PATCH RFC 0/2] kcov: collect coverage from usbhid interrupts
Date: Fri, 13 Dec 2019 13:11:26 +0100 [thread overview]
Message-ID: <CAAeHK+xkvQ3Jxot15pw1_EHZgZ2i539pLSxgXujDLWO0x0DrRw@mail.gmail.com> (raw)
In-Reply-To: <cover.1576170740.git.andreyknvl@google.com>
On Thu, Dec 12, 2019 at 6:15 PM Andrey Konovalov <andreyknvl@google.com> wrote:
>
> This patchset extends kcov to allow collecting coverage from interrupts
> and then uses the new functionality to collect coverage from usbhid code.
>
> What I'm not sure yet about this change is if we actually want to
> selectively annotate some parts of the USB stack that are executed in
> interrupt context, or maybe we can do this with some common approach.
>
> For example patch #2 in this patchset annotates all functions that are
> passed as completion callbacks to usb_fill_*() in drivers/hid/usbhid.
> Maybe instead we could redefine usb_fill_*() in a way that would handle
> all such cases without manual annotations.
Although looking at this again today, it seems much more logical to
add kcov annotations around the complete() callback in
__usb_hcd_giveback_urb(). Don't know why I didn't think of that. Will
do in the next version.
>
> Any suggestions are welcome.
>
> This has allowed to find at least one new HID bug [1], which was recently
> fixed by Alan [2].
>
> [1] https://syzkaller.appspot.com/bug?extid=09ef48aa58261464b621
> [2] https://patchwork.kernel.org/patch/11283319/
>
> This patchset has been pushed to the public Linux kernel Gerrit instance:
>
> https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/2225
>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
>
> Andrey Konovalov (2):
> kcov: collect coverage from interrupts
> HID: usbhid: kcov: add annotations for coverage collection
>
> Documentation/dev-tools/kcov.rst | 16 +--
> drivers/hid/usbhid/hid-core.c | 25 +++-
> drivers/hid/usbhid/usbkbd.c | 15 ++-
> drivers/hid/usbhid/usbmouse.c | 7 +-
> drivers/usb/gadget/udc/dummy_hcd.c | 1 +
> include/linux/sched.h | 3 +
> kernel/kcov.c | 196 +++++++++++++++++++----------
> lib/Kconfig.debug | 9 ++
> 8 files changed, 192 insertions(+), 80 deletions(-)
>
> --
> 2.24.1.735.g03f4e72817-goog
>
prev parent reply other threads:[~2019-12-13 20:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 17:15 [PATCH RFC 0/2] kcov: collect coverage from usbhid interrupts Andrey Konovalov
2019-12-12 17:15 ` [PATCH RFC 1/2] kcov: collect coverage from interrupts Andrey Konovalov
2019-12-12 18:15 ` Alan Stern
2019-12-13 12:08 ` Andrey Konovalov
2019-12-17 11:00 ` Dmitry Vyukov
2019-12-17 11:15 ` Andrey Konovalov
2019-12-17 11:35 ` Dmitry Vyukov
2019-12-17 12:21 ` Dmitry Vyukov
2019-12-17 12:27 ` Dmitry Vyukov
2019-12-17 13:03 ` Dmitry Vyukov
2020-02-26 18:42 ` Andrey Konovalov
2019-12-12 17:15 ` [PATCH RFC 2/2] HID: usbhid: kcov: add annotations for coverage collection Andrey Konovalov
2019-12-13 8:31 ` Jiri Kosina
2019-12-13 12:11 ` Andrey Konovalov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAeHK+xkvQ3Jxot15pw1_EHZgZ2i539pLSxgXujDLWO0x0DrRw@mail.gmail.com \
--to=andreyknvl@google.com \
--cc=akpm@linux-foundation.org \
--cc=benjamin.tissoires@redhat.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).