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: <Zfm21jBMZIci3P6P@casper.infradead.org>
Date: Tue, 19 Mar 2024 16:01:26 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Boqun Feng <boqun.feng@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Waiman Long <longman@...hat.com>, Will Deacon <will@...nel.org>,
	Clark Williams <williams@...hat.com>
Subject: Re: [PATCH] Locking: Let PREEMPT_RT compile again with new rwsem
 asserts.

On Tue, Mar 19, 2024 at 03:15:06PM +0100, Sebastian Andrzej Siewior wrote:
> On 2024-03-19 13:38:06 [+0000], Matthew Wilcox wrote:
> > On Tue, Mar 19, 2024 at 08:05:50AM +0100, Sebastian Andrzej Siewior wrote:
> > > -static inline void rwsem_assert_held_write_nolockdep(const struct rw_semaphore *sem)
> > > +static __always_inline bool rwsem_held_write(const struct rw_semaphore *sem)
> > 
> > The locking maintainers were very clear that this predicate Should Not
> > Exist.  It encourages people to write bad code.  Assertions only!
> 
> What do you refer to? The inline vs __always_inline or
> rwsem_held_write() should not exists and it should invoke directly
> rw_base_is_write_locked()?

I see Waiman already gave you the substantial answer ... but why did you
change inline to __always_inline?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ