lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260121185913.GJ166857@noisy.programming.kicks-ass.net>
Date: Wed, 21 Jan 2026 19:59:13 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Bart Van Assche <bvanassche@....org>
Cc: elver@...gle.com, linux-kernel@...r.kernel.org, bigeasy@...utronix.de,
	mingo@...nel.org, tglx@...utronix.de, will@...nel.org,
	boqun.feng@...il.com, longman@...hat.com, hch@....de,
	rostedt@...dmis.org, llvm@...ts.linux.dev
Subject: Re: [RFC][PATCH 2/4] locking/mutex: Add context analysis

On Wed, Jan 21, 2026 at 09:11:53AM -0800, Bart Van Assche wrote:
> On 1/21/26 3:07 AM, Peter Zijlstra wrote:
> > @@ -565,6 +574,8 @@ EXPORT_SYMBOL(mutex_unlock);
> >    * of a unlocked mutex is not allowed.
> >    */
> >   void __sched ww_mutex_unlock(struct ww_mutex *lock)
> > +	__releases(lock)
> > +	__no_context_analysis
> >   {
> >   	__ww_mutex_unlock(lock);
> >   	mutex_unlock(&lock->base);
> 
> "__releases()" annotations should be added to the declaration of a
> function only instead of the definition, isn't it?
> 
> > @@ -824,22 +838,27 @@ EXPORT_SYMBOL(ww_mutex_trylock);
> >   #ifdef CONFIG_DEBUG_LOCK_ALLOC
> >   void __sched
> >   mutex_lock_nested(struct mutex *lock, unsigned int subclass)
> > +	__acquires(lock)
> 
> Same comment here and below for the "__acquires()" annotation: I think
> this annotation should be added to the function declaration only.

Yeah, I thought I went through and lifted most of them. Clearly I missed
a few :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ