All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: elver@google.com, linux-kernel@vger.kernel.org,
	bigeasy@linutronix.de, mingo@kernel.org, tglx@linutronix.de,
	will@kernel.org, boqun.feng@gmail.com, longman@redhat.com,
	hch@lst.de, rostedt@goodmis.org, llvm@lists.linux.dev
Subject: Re: [RFC][PATCH 0/4] locking: Add/convert context analysis bits
Date: Thu, 22 Jan 2026 10:04:02 +0100	[thread overview]
Message-ID: <20260122090402.GD171111@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <e1229c44-048b-4e42-b545-18a8c716b5eb@acm.org>

On Wed, Jan 21, 2026 at 12:37:21PM -0800, Bart Van Assche wrote:
> On 1/21/26 11:23 AM, Peter Zijlstra wrote:
> > Pushed out an updated/fixed series to:
> > 
> >    git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
> 
> With CONFIG_WARN_CONTEXT_ANALYSIS=y, CONFIG_WARN_CONTEXT_ANALYSIS_ALL=n
> and "+src:*include/*=emit" in scripts/context-analysis-suppression.txt
> I see the following error messages for that tree:
> 
> In file included from kernel/locking/mutex.c:22:
> In file included from ./include/linux/ww_mutex.h:21:
> ./include/linux/rtmutex.h:44:25: error: reading variable 'owner' requires
> holding raw_spinlock '&rt_mutex_base::wait_lock'
> [-Werror,-Wthread-safety-analysis]
>    44 |         return READ_ONCE(lock->owner) != NULL;
>       |                                ^
> ./include/linux/rtmutex.h:52:56: error: reading variable 'owner' requires
> holding raw_spinlock '&rt_mutex_base::wait_lock'
> [-Werror,-Wthread-safety-analysis]
>    52 |         unsigned long owner = (unsigned long)
> READ_ONCE(lock->owner);
>       |                                                               ^
> 2 errors generated.
> 
> Should this series perhaps include changes for the file
> scripts/context-analysis-suppression.txt?

I'm having trouble reproducing :-(

You're speaking of something like the below, on a defconfig build,
right?

---
diff --git a/scripts/context-analysis-suppression.txt b/scripts/context-analysis-suppression.txt
index fd8951d06706..6c31eadd0244 100644
--- a/scripts/context-analysis-suppression.txt
+++ b/scripts/context-analysis-suppression.txt
@@ -14,6 +14,7 @@ src:*include/linux/*
 src:*include/net/*
 
 # Opt-in headers:
+src:*include/*=emit
 src:*include/linux/bit_spinlock.h=emit
 src:*include/linux/cleanup.h=emit
 src:*include/linux/kref.h=emit

  reply	other threads:[~2026-01-22  9:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 11:07 [RFC][PATCH 0/4] locking: Add/convert context analysis bits Peter Zijlstra
2026-01-21 11:07 ` [RFC][PATCH 1/4] compiler-context-analysys: Add __cond_releases() Peter Zijlstra
2026-01-21 13:09   ` Marco Elver
2026-01-21 17:55   ` Bart Van Assche
2026-01-21 18:35     ` Marco Elver
2026-01-21 19:02       ` Peter Zijlstra
2026-01-21 21:02         ` Bart Van Assche
2026-03-09 19:48   ` [tip: locking/core] " tip-bot2 for Peter Zijlstra
2026-01-21 11:07 ` [RFC][PATCH 2/4] locking/mutex: Add context analysis Peter Zijlstra
2026-01-21 17:11   ` Bart Van Assche
2026-01-21 18:59     ` Peter Zijlstra
2026-03-09 19:48   ` [tip: locking/core] " tip-bot2 for Peter Zijlstra
2026-01-21 11:07 ` [RFC][PATCH 3/4] locking/rtmutex: " Peter Zijlstra
2026-01-21 17:15   ` Bart Van Assche
2026-01-21 19:01     ` Peter Zijlstra
2026-03-09 19:48   ` [tip: locking/core] " tip-bot2 for Peter Zijlstra
2026-01-21 11:07 ` [RFC][PATCH 4/4] futex: Convert to compiler " Peter Zijlstra
2026-01-21 13:19   ` Peter Zijlstra
2026-03-18  8:02   ` [tip: locking/core] " tip-bot2 for Peter Zijlstra
2026-01-21 13:07 ` [RFC][PATCH 0/4] locking: Add/convert context analysis bits Marco Elver
2026-01-21 19:23 ` Peter Zijlstra
2026-01-21 20:37   ` Bart Van Assche
2026-01-22  9:04     ` Peter Zijlstra [this message]
2026-01-22 16:28       ` Bart Van Assche
2026-01-22 18:58         ` Nathan Chancellor
2026-01-23 11:06           ` Peter Zijlstra
2026-01-23 11:15         ` Peter Zijlstra
2026-01-23 18:58           ` Bart Van Assche
2026-01-23 20:15             ` Marco Elver
2026-01-23 14:16   ` Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260122090402.GD171111@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=bvanassche@acm.org \
    --cc=elver@google.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=longman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.