Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1144310ybl; Thu, 12 Dec 2019 10:17:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzEdrHfP636VMV2OqFSC3OW+PRM3TBJMynxmHjIkYjf/ViVu50xVD93XKN4gCJ/6BmXGX3s X-Received: by 2002:a9d:dc1:: with SMTP id 59mr9748035ots.250.1576174647594; Thu, 12 Dec 2019 10:17:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576174647; cv=none; d=google.com; s=arc-20160816; b=SGHaMIUWpOctbpHLkWnH/XxtB5pyVJJerpRJd7KVLDLg8l5ZFEChX//DVuTTBxcik8 sOEZVcOwHugfMYNyCfZ+CrueXofqbhedc1uxQjILdAR0jh3XOAOTAoF4m203XWRN29yc z6y+ijwJ+rzSKQzlznSUy7D65Ek0yhfOQTzyzEX6b5itQwS3d1rTSLpCxEjmJi6WvR+s x364ZlwMtk8UXMGme3xrCQWY56C3AsJhS2onHKVsOEQiD4eUav1R9VeaHxt8+l4pM855 VcHbMPA3X4GkFKtuSQyosI1ncaS6mCxwJUL1nAKMJmfzRCEzUl7tPFtLQ5/+PF+Rjoam lrNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=zQ4F2uJHy6R0u2FFwpGBHSZML/nRrbR1hlfm6q/b4YI=; b=vvOOha9OIr7oDxpLKdYYsKwboiwXnrsoialDgzKwYn0yUWeRX1DP8t/GIUaMZooEml UA7K2QdYmlNNDGuMWcY3fX/bzr8covr4r0rQ3grSERYeNXQewEhv8pjQJa+mpQuGmemQ u5Pck45sPzimnODPlsl2MAXMSS0EuLNnChWGGkhcFS515iMRvkP51vqcL6PlxeVHfUkF by22XdqBVlP0hR+hXKO63KIR8MzAXZXENEWATTx8sgrDPSFWFCiZqn1AUD9o8iVGtmU4 QzVUM3T6gO39xxCtMwIn/WBDxI9r8BDpUOM+aHiLZUQlN96jFCKizg3zVgGyRm8GScag /NOA== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si3647423otk.171.2019.12.12.10.17.15; Thu, 12 Dec 2019 10:17:27 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730396AbfLLSPb (ORCPT + 99 others); Thu, 12 Dec 2019 13:15:31 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:52850 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1730246AbfLLSPa (ORCPT ); Thu, 12 Dec 2019 13:15:30 -0500 Received: (qmail 3202 invoked by uid 2102); 12 Dec 2019 13:15:29 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 12 Dec 2019 13:15:29 -0500 Date: Thu, 12 Dec 2019 13:15:29 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Andrey Konovalov cc: Dmitry Vyukov , Greg Kroah-Hartman , Jiri Kosina , Benjamin Tissoires , Andrew Morton , , , , Alexander Potapenko , Marco Elver Subject: Re: [PATCH RFC 1/2] kcov: collect coverage from interrupts In-Reply-To: <95e7a12ac909e7de584133772efc7ef982a16bbb.1576170740.git.andreyknvl@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 > #include > #include > +#include > > #include > #include That's the only change to this driver. As such, it doesn't appear to be needed, judging by the patch description. Alan Stern