Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp113182lqp; Tue, 21 May 2024 21:21:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVWsDSZiFWW95Yv68f4WmU/NZiyoQTmVyrb5yZz0UpdoHJBEJTZtxm9uHmJX6uDpkS2jRDjPug0jvZHz1UgYeppsa3EvIdUIUxwfrDyDQ== X-Google-Smtp-Source: AGHT+IE9vWkPDeo5rjumInsJr9KAcUwSZsaQ871LvRmfml23tXSQJdLc+iwxWuLclUyid8576eNh X-Received: by 2002:a05:620a:28ca:b0:792:e044:3adc with SMTP id af79cd13be357-7949944fc0fmr107862785a.37.1716351714790; Tue, 21 May 2024 21:21:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716351714; cv=pass; d=google.com; s=arc-20160816; b=HlNOD9Qkza0bdM85lXPhT1lfPCm2UhX5GYkLYv4tkcFbm5GH4q2cXbxA3qlzU3Lf2V +HZxBIx0T4ZkeP0ZJcnFuEPGmJERnJE6IQgi+pdoW013x78glBp4JbnWbrZgrIHvBzKY z3/io5Exw4GKy2FiE90M9Mfvh7zKMyP0pJQk0bPDa2AFYMc/Z+lZRH8E+JSthxzkp0zI 5iYlIeVE+czH21eyDnuHEgcydX6IdYUFlsvROa9cixqQnHtcnOuzaJ2gPptm9Xf7K+7E uPZgbCdbbOEV6jAAOUuC/Y1ZBQz68Nlm2Fm88rHOgZvzxy8WI6ucOIT7XGgPPb938P94 +HRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qcnd7a+AaQ3z4LM1z4EPj3xZikJZip8p7JvP4EzHHU4=; fh=UBgkGi+ivyAZAk+bhmERUx/jOzOdok8SfvOZxyMLOLg=; b=B5TjEQH9SPQPFr25jhdfLuZYEMNiIZWL2VzjyoC0QMXG6ecb31qBAlONzZzI81FaLx 57bGc0Wd/C5mIs981xEpLP+18jWRhlImdXIIvOu0ipXzPrfXCFdIei/Vx8IDrjxfCuP6 OS8Tyt2OFpCgWHxTn6EOXMlE8OkZlHWF0D/np+IaApPbh45s0xxk7ocT/cD+wrMtr9je lsvkjXN8dU0gdqz8eFmN/soXhHQvV8nfFSH77SSKEdBrwEwxFCIYMAie5Z+2FX6nEcUt 2obubLtepNHNg5SBb95GPIbb/MBgqsggFoPwxbpC4GnIk2Uz5bETFxyUru8gTWV3pB9m ceDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zSy+agBl; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-185757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf30ac4bsi3184263285a.229.2024.05.21.21.21.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 21:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zSy+agBl; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-185757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 845861C2113A for ; Wed, 22 May 2024 04:21:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C0E6763FC; Wed, 22 May 2024 04:21:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zSy+agBl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F059360; Wed, 22 May 2024 04:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716351705; cv=none; b=mt2mgpw1rzlmzUycEWtkQBaP+96h5niwLg7qNY+UiihWnaU5PdVBO0BpVWFMdSVGlZ/dxcNyVdyyGOyosHROzVjGTPcUACnvqxOGpRLxT3XPHV7nxBZmTEGbMMtqC3E/aSrujsENW5RiHqv+oRUyatkGhHzav0L/F3AMem4zQYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716351705; c=relaxed/simple; bh=mTHrYVSkHty3/g7xV+eC5f2SXN3gBUMTd6Tb7+MCzHc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jMb1ejcxXjWMV0w4peS/Zt23nIoyYDdCbtKgohsvqqy84be7HKgYHTR52inlev07OmUyIC8K7PpWsEOyfkOXOh3q8AFfIRUIBaobjwG4bHziLOf7pvU/e0vzvhrmXelzzP8fCCvTyos4UW3zRdm7ZvhDTYLkKl1KUUmdL1voZDM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zSy+agBl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AC02C2BD11; Wed, 22 May 2024 04:21:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716351705; bh=mTHrYVSkHty3/g7xV+eC5f2SXN3gBUMTd6Tb7+MCzHc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zSy+agBl8A3AjVFuIfw0v/OrqRA0TiNAdvglJVwWIeuTYMn6wZ8aRDjASefpznw1H g/MwcHoNwgCL2z2NuRIRrImXxcIifglCBAR2iGyi0CEGs+JMkD9Qlcl4r/3MC70pgs rVgwuRQdYsb2ygzRZSOiwro1Caweu8tu7FTVbS7c= Date: Wed, 22 May 2024 06:21:42 +0200 From: Greg Kroah-Hartman To: andrey.konovalov@linux.dev Cc: Alan Stern , Andrey Konovalov , Dmitry Vyukov , Marco Elver , Alexander Potapenko , kasan-dev@googlegroups.com, Tetsuo Handa , Tejun Heo , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] kcov, usb: disable interrupts in kcov_remote_start_usb_softirq Message-ID: <2024052232-juggle-oxygen-5bd2@gregkh> References: <20240521204324.479972-1-andrey.konovalov@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240521204324.479972-1-andrey.konovalov@linux.dev> On Tue, May 21, 2024 at 10:43:24PM +0200, andrey.konovalov@linux.dev wrote: > From: Andrey Konovalov > > After commit 8fea0c8fda30 ("usb: core: hcd: Convert from tasklet to BH > workqueue"), usb_giveback_urb_bh() runs in the BH workqueue with > interrupts enabled. > > Thus, the remote coverage collection section in usb_giveback_urb_bh()-> > __usb_hcd_giveback_urb() might be interrupted, and the interrupt handler > might invoke __usb_hcd_giveback_urb() again. > > This breaks KCOV, as it does not support nested remote coverage collection > sections within the same context (neither in task nor in softirq). > > Update kcov_remote_start/stop_usb_softirq() to disable interrupts for the > duration of the coverage collection section to avoid nested sections in > the softirq context (in addition to such in the task context, which are > already handled). > > Reported-by: Tetsuo Handa > Closes: https://lore.kernel.org/linux-usb/0f4d1964-7397-485b-bc48-11c01e2fcbca@I-love.SAKURA.ne.jp/ > Closes: https://syzkaller.appspot.com/bug?extid=0438378d6f157baae1a2 > Suggested-by: Alan Stern > Fixes: 8fea0c8fda30 ("usb: core: hcd: Convert from tasklet to BH workqueue") > Acked-by: Dmitry Vyukov > Signed-off-by: Andrey Konovalov > > --- > > Changes v1->v2: > > - Fix compiler error when CONFIG_KCOV=n. > --- > drivers/usb/core/hcd.c | 12 ++++++----- > include/linux/kcov.h | 47 ++++++++++++++++++++++++++++++++++-------- > 2 files changed, 45 insertions(+), 14 deletions(-) Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot