From: Dmitry Vyukov <dvyukov@google.com>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
USB list <linux-usb@vger.kernel.org>,
"open list:HID CORE LAYER" <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 1/2] kcov: collect coverage from interrupts
Date: Tue, 17 Dec 2019 12:35:13 +0100 [thread overview]
Message-ID: <CACT4Y+a+8u=OoUeC247he4EM1x=CJEeMvix=XViQVfkiU_Kk2Q@mail.gmail.com> (raw)
In-Reply-To: <CAAeHK+xyVh6QkbUp6z+fLrv5f9sODkgFuvmBU1jB8borQ9M65g@mail.gmail.com>
On Tue, Dec 17, 2019 at 12:16 PM Andrey Konovalov <andreyknvl@google.com> wrote:
> > > On Thu, Dec 12, 2019 at 7:15 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> > > >
> > > > On Thu, 12 Dec 2019, Andrey Konovalov wrote:
> > > >
> > > > > This change extends kcov remote coverage support to allow collecting
> > > > > coverage from interrupts in addition to kernel background threads.
> > > > >
> > > > > To collect coverage from code that is executed in interrupt context, a
> > > > > part of that code has to be annotated with kcov_remote_start/stop() in a
> > > > > similar way as how it is done for global kernel background threads. Then
> > > > > the handle used for the annotations has to be passed to the
> > > > > KCOV_REMOTE_ENABLE ioctl.
> > > > >
> > > > > Internally this patch adjusts the __sanitizer_cov_trace_pc() compiler
> > > > > inserted callback to not bail out when called from interrupt context.
> > > > > kcov_remote_start/stop() are updated to save/restore the current per
> > > > > task kcov state in a per-cpu area (in case the interrupt came when the
> > > > > kernel was already collecting coverage in task context). Coverage from
> > > > > interrupts is collected into pre-allocated per-cpu areas, whose size is
> > > > > controlled by the new CONFIG_KCOV_IRQ_AREA_SIZE.
> > > > >
> > > > > This patch also cleans up some of kcov debug messages.
> > > > >
> > > > > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> > > > > ---
> > > >
> > > > > diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
> > > > > index 4c9d1e49d5ed..faf84ada71a5 100644
> > > > > --- a/drivers/usb/gadget/udc/dummy_hcd.c
> > > > > +++ b/drivers/usb/gadget/udc/dummy_hcd.c
> > > > > @@ -38,6 +38,7 @@
> > > > > #include <linux/usb/gadget.h>
> > > > > #include <linux/usb/hcd.h>
> > > > > #include <linux/scatterlist.h>
> > > > > +#include <linux/kcov.h>
> > > > >
> > > > > #include <asm/byteorder.h>
> > > > > #include <linux/io.h>
> > > >
> > > > That's the only change to this driver. As such, it doesn't appear to
> > > > be needed, judging by the patch description.
> > >
> > > Right, will fix in the next version, thanks!
> >
> > Please also post a github or gerrit link. These small scraps of
> > changes without context and better visualisation are extremely hard to
> > review meaningfully.
>
> The link is in the cover letter:
>
> https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/2224/1
Sorry, missed. Now I can read it!
next prev parent reply other threads:[~2019-12-17 11:35 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 [this message]
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 ` [PATCH RFC 0/2] kcov: collect coverage from usbhid interrupts Andrey Konovalov
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='CACT4Y+a+8u=OoUeC247he4EM1x=CJEeMvix=XViQVfkiU_Kk2Q@mail.gmail.com' \
--to=dvyukov@google.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=benjamin.tissoires@redhat.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).