Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1247062pxb; Fri, 13 Nov 2020 07:52:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJyk/dsU3/GZ6AakeSm1CVm7PyQ8OwiVePI5jLBRPksN1pcrPD0u2gb/IDtihMQjgI6bGq X-Received: by 2002:a05:6402:17ac:: with SMTP id j12mr3058678edy.31.1605282749043; Fri, 13 Nov 2020 07:52:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605282749; cv=none; d=google.com; s=arc-20160816; b=09QokqN5ajrrUYs2j+5+LP03q2S9Ha3pjoZmeZUqaZV6FUyiOibmwFm++71uAac0Nx OzQmv+WsNSpnvOAyhlEb91yRKd4zo+3BvBJvtQN+axzsSe5e8ShiJv5cyqdYhHhT3D0p o//gC5EyQTnCByo7quiQtBpA9kdubgcYLOEPxhOtZm6lZhza7U6b3hrkzDS97/yctPix ketWmjp2gQ2fCqq1tZYiWa1/4WOI7q8wNcyy2508G1BurAIARyzyGYMr2PalNhbvvW0P qfAawynM0GiRu4et1DEOlCJEiqof5n+AkHqkxWYK/nR7VisRZdCJ2BlxzOnYM7qSFHlv OWXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ITN/VwmToF8JO+5dUf151w/YV2UUx/XnMJGOWKQ4yB0=; b=Pwfs1Zyhqz7uXur3lMuoidvVoxBOU9cPf3qkR8XueVt1MLyMfJeS5gWdOx9lPGfQff Ssiveh9R0SlIHmPzsHPsHii8cD1T1wsLFwhgG681ZkxdJ3QWOxBnx1c7iyPUNBR9E1fr K8aAKQ6McsXLp5a1dx9iyLywYo5MqixKQPPIPcep0pe6GKfayP5SxAj7aK2jx24VaMnz qmtr+W0+QrW2UkdXcij3bOYZRwcdFw+dvE3eEfjlb9DbeEOWWI+K8v5xv+WXEajLVoLL rP6HqQugYFNQVPaxgjBSb/Klb7CWy7WRyjWEiK8XIvfdkOhilWm8ma1QGC7YH8oDBb4y et4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=e3B8zi+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si5929861ejx.583.2020.11.13.07.52.02; Fri, 13 Nov 2020 07:52:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=e3B8zi+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbgKMPrS (ORCPT + 99 others); Fri, 13 Nov 2020 10:47:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgKMPrR (ORCPT ); Fri, 13 Nov 2020 10:47:17 -0500 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FE4EC0613D1 for ; Fri, 13 Nov 2020 07:47:17 -0800 (PST) Received: by mail-ot1-x341.google.com with SMTP id h16so5185143otq.9 for ; Fri, 13 Nov 2020 07:47:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ITN/VwmToF8JO+5dUf151w/YV2UUx/XnMJGOWKQ4yB0=; b=e3B8zi+09jNaeLEgxxw8TGHRusy89tboB52gu4WqUpg07/U1n/7Pnq001IusQnQbGm KgI7YjFCmV9THbu0RmYqbfIChtHkHnjBHtfIefezbKoYD5PijIkwWFps4fY2O7eSz0Ob dBOnCoBpAF6Li+NdlgJwX85OIN28aAv3IfHcjKp8zBMiSTDx1JlJQB9YlfGM36uhbZTU bHScsXijCTtKxfg5KLOdIsZA/xuALvcXzRJcNlpOgYCV/1Db4VGDPK9VKShDwKoT9HZ+ NJNsNWRQvQiB4XwxwINWlHEDai31yCUxTnsI09SDH5J/iMrf3v53zSMNv1BtXP1KiuEO x1QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ITN/VwmToF8JO+5dUf151w/YV2UUx/XnMJGOWKQ4yB0=; b=RoZ0kJPgyOFwdXBG5j32TAFcH+NBfJ6vLewIoY/prpE59peGsOm5W6cRGkmDaJT2Ra AmrpJ/4w9RASqaIt9stqYS3etKSnfataGCQJKmb4IYW/lvsoju8Mw13hbQXPAPdPYlTp RO6C36ZI7p5zyR+Ce30O87s4yQhWKIOBfWOVXaytQ4YpiJeCTsbpAHFipgUQwYx9f0CA /1F3zG8rwmaliIQcn+w3MwqR4Zno6dq3/c+R3+D0DM+nVAht0siBg+0WX5jDMA/RqE6y dcnwQdenY/ExOh2HMMdWDU+FiybbGJhVoTb7nT3zd4i8QyxIkIdJUhVYKUmLzgglDrQi ycEg== X-Gm-Message-State: AOAM531W2y2V9O9gtpSwQAiTfwDNcapaRIr/+oAvh80cV/OKwv2Eqi9b m/o7Ce+SBnJSXnvV+9q/sHvteJurvlfqP7RmnNbqLA== X-Received: by 2002:a9d:649:: with SMTP id 67mr2020465otn.233.1605282432199; Fri, 13 Nov 2020 07:47:12 -0800 (PST) MIME-Version: 1.0 References: <20201113123035.tjllvijjzd54npsf@linutronix.de> <20201113132818.zhtdhzg6ukv4wgxl@linutronix.de> In-Reply-To: From: Marco Elver Date: Fri, 13 Nov 2020 16:47:00 +0100 Message-ID: Subject: Re: [PATCH v4] kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq To: Andrey Konovalov Cc: Sebastian Andrzej Siewior , Greg Kroah-Hartman , Dmitry Vyukov , USB list , LKML , Andrew Morton , Alan Stern , Shuah Khan , Alexander Potapenko , Aleksandr Nogikh , Nazime Hande Harputluoglu , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Nov 2020 at 14:42, Andrey Konovalov wrote: > On Fri, Nov 13, 2020 at 2:28 PM Sebastian Andrzej Siewior > wrote: > > > > On 2020-11-13 13:51:19 [+0100], Andrey Konovalov wrote: > > > Hi Sebastian, > > > > Hi Andrey, > > > > > Replaced with what and why? > > > > Linus requested in > > https://lkml.kernel.org/r/CAHk-=wht7kAeyR5xEW2ORj7m0hibVxZ3t+2ie8vNHLQfdbN2_g@mail.gmail.com/ > > > > that drivers should not change their behaviour on context magic like > > in_atomic(), in_interrupt() and so on. > > The USB bits were posted in > > https://lkml.kernel.org/r/20201019100629.419020859@linutronix.de Arguably this patch is *not* changing "driver behaviour", it's only changing how and when KCOV collects coverage, which is not related to how the driver behaves. > > and merged (which is probably the same time as this patch). > > > > I haven't look what this code should do or does but there are HCDs for > > which this is never true like the UHCI/OHCI controller for instance. > > We could go back to adding softirq-specific kcov callbacks. Perhaps > with a simpler implementation than what we had before to only cover > this case. Something like kcov_remote_start_usb_softirq() and > kcov_remote_stop_softirq() that do the softirq check internally. Is this a matter of simply banning such functions entirely without understanding their use? Because that sounds wrong. But if it is, we probably have to just add some static inline functions in include/linux/kcov.h that simply does the check. Thanks, -- Marco