Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp311526rdb; Mon, 22 Jan 2024 05:10:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXcz3pMN+/28Y/1nOE+wC9sNjoAq6FcJeC3aVtfBIFPA8o105PnIgODtprm4rwgbsMrglL X-Received: by 2002:a05:6512:3114:b0:50e:60eb:255e with SMTP id n20-20020a056512311400b0050e60eb255emr1573835lfb.23.1705929019252; Mon, 22 Jan 2024 05:10:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705929019; cv=pass; d=google.com; s=arc-20160816; b=WSZOZkfwlaw87XjYcm5rPoKHRTzUyo47GQCEwdP3S1LF7rAihNQq1nA4F7XTGF+3LD tAEbDfcjvrzIJkm/x0OnVI1CBfhfSc/qO4h9vENBRCjcpt1LIpUIsXG7NgWJoTjGdrmy nzP6oR4tg5S29bpczxAXiHT5neAvHePZ5ap7JdDw4VGfL5LyM1mL5BscJmUYr+moo+uG 3mt8NniYGVjb9ETOB8rSsvebemoFiocaYsBI0zVb2OYQk+c0n24no3Mp7a0z2+j3acD1 D1WzCbgSW1poYVYmmtXndz5suSvldEOFIH2KsBgGqmutNv9YPqSw7+kPV+cCYkgUqtJ8 +3gg== 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=TVVswpBlwJvBGzeDxEmiZvkIxmSiPdE1iipBHfKLDhI=; fh=SVS83+KE03bUHTgEXtum7BojjOmzfwYtzB/b8ehRDwg=; b=mmnrzAJV+b2inIXJiv+8+hx2DB5AtkzrVjVUqq+X89o4Xe7XVOx2so3xJD/iQ0GSU8 zedlFowedV193V9Pqo8s2b8cxFfoOcSeo7mxWlk485qQxyh3vZC0h1fYE1uT3fqD1T1C +CYOFdJtXmpWGY7gBc/7MZ0ETcCqnN5fsgv7JOakJkzU6zTVBnXZPh7hXyMYEPXYuNvr 4P9mhkOBN/1aVEJyl1tXTxftMM2PIqW95a0QRmWzaQHfRGF+fSdt4X0bOkUH7Xb8FAYI VhEkATRXyxS6fEoimPdZIUR6rBjBKRXYTvYX8z85giBOik5xFv3zJTvm/sMmhiRukMXc O6gA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KYFOdbuy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-2327-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lj4-20020a170906f9c400b00a236dd6abdfsi10827818ejb.712.2024.01.22.05.10.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 05:10:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2327-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KYFOdbuy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-2327-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id F3D8D1F2470A for ; Mon, 22 Jan 2024 13:10:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 970743CF47; Mon, 22 Jan 2024 13:10:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KYFOdbuy" X-Original-To: linux-wireless@vger.kernel.org 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 702D63C6B3; Mon, 22 Jan 2024 13:10:06 +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=1705929006; cv=none; b=S7FpSoehodqe7qf+/CtmNGiCVzQYzvP4SW2KIBl7WqQnPSaPz5ziLQcyFahb1TQspWu+1e9sEQuF1jaxdpTHQHhWdfrYgSHw33lCogTsHnbM/1Lf4JIXwaik7JK1T/OdYGf3r3WJXfru9gMi3gaQbgqjyTv18FRqOZJ42JaLCxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705929006; c=relaxed/simple; bh=Ol96TTNYfOJdyv4nPvv9/24t5Z86jPnPqKam2MbKhfo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pQeY64b5hUHrxxbdpFg2r/ORw2Oe0bT6RMB3wsz/MgJYHfWYG0kfz2S7Ua6yXaVbIcMVeXa05if8dMZ9auufE/6xTR1Wb0NEmIE8O7qD7eR+6mQcWBGjOb0Zr3c1lQ98hPBX/fXbUVi9ctOjZ3z5IMc+60fXtcvmchGjRPcVVaE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KYFOdbuy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED2BCC433C7; Mon, 22 Jan 2024 13:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705929006; bh=Ol96TTNYfOJdyv4nPvv9/24t5Z86jPnPqKam2MbKhfo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KYFOdbuyilxaaHOh5qzgYaJE+e7iG2+JYBD9R7IOieiz9dmxiaJLOmHrKgWnhcsTU PkTsXJR437gYgDDHnKeH1bqpl34GUjexQmzCyB018vp68IzEfpYmaWz6t20LrGbtZ1 qPQyRsY7sSaPRYgBKY1c1O9DVrSLwhxWlHmxvDafWYd0WhDsn0o4XlQ/LIXNes3zWa i5M5yEtOQTostafqOftsVA0iFEZMzj1CsacfJPur8aLwNAqCUTXHVObSSMM1zgL7xX buKaYThBY/YM8gdm4JJ/+tSRRrQF3TNh4YJdxYtlq8qGzX3nTQoRAwjHIREOlyMj2m TOnGwYy5RHApg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rRu48-0000000083I-261d; Mon, 22 Jan 2024 14:10:17 +0100 Date: Mon, 22 Jan 2024 14:10:16 +0100 From: Johan Hovold To: Kalle Valo Cc: Johan Hovold , Jeff Johnson , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: ath11k: checking RCU usage Message-ID: References: <20231019153115.26401-1-johan+linaro@kernel.org> <87o7goxget.fsf@kernel.org> <87zfx98r6a.fsf_-_@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@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: <87zfx98r6a.fsf_-_@kernel.org> Hi Kalle, On Sat, Jan 13, 2024 at 12:26:53PM +0200, Kalle Valo wrote: > (old discussion, changing title) > > Johan Hovold writes: > > > On Tue, Oct 24, 2023 at 05:07:38PM +0300, Kalle Valo wrote: > >> Thanks for the fixes. I really like using lockdep_assert_held() to > >> document if a function requires some lock held, is there anything > >> similar for RCU? > > > > Not really, but the checking is instead built into the primitives like > > rcu_dereference() and enabled whenever CONFIG_PROVE_RCU is set. > > > > For some special cases, we have open-coded checks like: > > > > RCU_LOCKDEP_WARN(!rcu_read_lock_held()); > > > > which similarly depend on CONFIG_PROVE_RCU or simply > > > > WARN_ON_ONCE(!rcu_read_lock_held()); > > I just found out that sparse has __must_hold(): > > https://lore.kernel.org/linux-wireless/87sf31hhfp.fsf@kernel.org/ > > That looks promising, should we start using that in ath11k and ath12k to > check our RCU usage? I see that Johannes already commented on this in the thread above. I'm pretty sure smatch can't be used for this. Johan