From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 8B92030498E; Thu, 11 Dec 2025 11:44:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765453485; cv=none; b=rpN6lOnpCyTvC2P3x4FK2FSt/YO/F3qKcxP7yU2cUR2diXrntvQb0FD7y5NYjGytNVrToT7lXBkHlhiXVEviL2IVSMka8/FqlSB9u5H2oDvNh0gBVG5rDpd1LlpUvucy7zU22V8ou/TKcYJDoI8q9cylXoK1szzFI7PfsyzEB4Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765453485; c=relaxed/simple; bh=58/Ao+s84qwJwv4zr3xEZigLVkU0Pj6c3+rIe/4WF8M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SfqXpjDt1yqCLJrmeIQLFvjs5twhToUscDAaOt6yhIKn0l05i1bgzfTKRyXsZcZhbhg5eoiTzuuwAaZL95JBBTQGwPjFMx42F9dtJpFK3HbtJdMnXz6kPFq5MtDvxHu3dq4Q1waWvIswYFmWPj8DmKSm0TdtH+sVnb2TrX22vis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=uIJmfimn; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="uIJmfimn" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1Xyvz2EmetVTqNxA3ooND6KrVryVhRTmeDWJ7L8+Veo=; b=uIJmfimnlNHvC/G7x6PPflA13K lshdJGbQZ4Hj6U3gBt+qTwrd7U8BHV3bTjJFXW5qDlWjqGZEsKv1RsQk1E0GucLcbJGz3KswikKF3 FC9DO6iNWOf6K4jpEp8JjNWgtpdSRXEXFrNc2CLESx/naRoQs54Gzizq9ktTzAzRlq9Z5+clz0NEx k3OH+xn15/MmfudhJetIFZG31/V4Z7jkj3+XQEqjINgec//KCLdIEKn1mk9FdcfkcSlQqdLKwxrM7 pm8yeej2PowuoHC6yP98kzuZOludbZHHtNOyU0VV+rXNKI4WmbwiV4TtB8qVZsgsvBZvLZxCpvSrr AuH3zvWQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vTf60-0000000EBKA-0bcG; Thu, 11 Dec 2025 11:44:32 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id AF7D630301A; Thu, 11 Dec 2025 12:44:31 +0100 (CET) Date: Thu, 11 Dec 2025 12:44:31 +0100 From: Peter Zijlstra To: Marco Elver Cc: Boqun Feng , Ingo Molnar , Will Deacon , "David S. Miller" , Luc Van Oostenryck , Chris Li , "Paul E. McKenney" , Alexander Potapenko , Arnd Bergmann , Bart Van Assche , Christoph Hellwig , Dmitry Vyukov , Eric Dumazet , Frederic Weisbecker , Greg Kroah-Hartman , Herbert Xu , Ian Rogers , Jann Horn , Joel Fernandes , Johannes Berg , Jonathan Corbet , Josh Triplett , Justin Stitt , Kees Cook , Kentaro Takeda , Lukas Bulwahn , Mark Rutland , Mathieu Desnoyers , Miguel Ojeda , Nathan Chancellor , Neeraj Upadhyay , Nick Desaulniers , Steven Rostedt , Tetsuo Handa , Thomas Gleixner , Thomas Graf , Uladzislau Rezki , Waiman Long , kasan-dev@googlegroups.com, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-sparse@vger.kernel.org, linux-wireless@vger.kernel.org, llvm@lists.linux.dev, rcu@vger.kernel.org Subject: Re: [PATCH v4 02/35] compiler-context-analysis: Add infrastructure for Context Analysis with Clang Message-ID: <20251211114431.GD3911114@noisy.programming.kicks-ass.net> References: <20251120145835.3833031-2-elver@google.com> <20251120145835.3833031-4-elver@google.com> Precedence: bulk X-Mailing-List: linux-sparse@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: <20251120145835.3833031-4-elver@google.com> On Thu, Nov 20, 2025 at 03:49:04PM +0100, Marco Elver wrote: > +/** > + * __guarded_by - struct member and globals attribute, declares variable > + * only accessible within active context > + * > + * Declares that the struct member or global variable is only accessible within > + * the context entered by the given context guard. Read operations on the data > + * require shared access, while write operations require exclusive access. > + * > + * .. code-block:: c > + * > + * struct some_state { > + * spinlock_t lock; > + * long counter __guarded_by(&lock); > + * }; > + */ > +# define __guarded_by(...) __attribute__((guarded_by(__VA_ARGS__))) I must express pure hatred for this '.. code-block:: c' thing.