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] [day] [month] [year] [list]
Message-ID: <Z_Su2cIL2U27mZ-N@infradead.org>
Date: Mon, 7 Apr 2025 22:06:33 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Christoph Hellwig <hch@...radead.org>,
	Mateusz Guzik <mjguzik@...il.com>,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	Christian Brauner <brauner@...nel.org>,
	Leon Romanovsky <leon@...nel.org>, pr-tracker-bot@...nel.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] vfs mount

On Mon, Apr 07, 2025 at 09:00:10AM -0700, Linus Torvalds wrote:
> On Mon, 7 Apr 2025 at 01:51, Christoph Hellwig <hch@...radead.org> wrote:
> >
> > The scoped one with proper indentation is fine.  The non-scoped one is
> > the one that is really confusing and odd.
> 
> Ahh, I misunderstood you.
> 
> You're obviously right in a "visually obvious" way - even if it was
> the scoped one that caused problems.
> 
> But the non-scoped one is *so* convenient when you have a helper
> function that just wants to run with some local (or RCU) held.

I wish we'd just hage a way to run an existing scope, especially a
funtion fun with a lock, e.g.

int some_helper(....)
	scoped_lock(&some_mutex)
{
	...
}

which would give you that with a much more obvious and redable
syntax.  Not taking the resource in the middle of the block and
releasing it at the end will also fix tons of bugs for non-obvious
behavior.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ