[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250821-erkunden-gazellen-924d52f0a1c6@brauner>
Date: Thu, 21 Aug 2025 09:45:22 +0200
From: Christian Brauner <brauner@...nel.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
David Laight <david.laight.linux@...il.com>, Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Peter Zijlstra <peterz@...radead.org>, Darren Hart <dvhart@...radead.org>,
Davidlohr Bueso <dave@...olabs.net>, André Almeida <andrealmeid@...lia.com>,
x86@...nel.org, Jan Kara <jack@...e.cz>, linux-fsdevel@...r.kernel.org
Subject: Re: [patch 0/4] uaccess: Provide and use helpers for user masked
access
On Thu, Aug 21, 2025 at 12:48:15AM +0100, Al Viro wrote:
> On Tue, Aug 19, 2025 at 01:39:09AM +0100, Al Viro wrote:
> > I'm still trying to come up with something edible for lock_mount() -
> > the best approximation I've got so far is
> >
> > CLASS(lock_mount, mp)(path);
> > if (IS_ERR(mp.mp))
> > bugger off
>
> ... and that does not work, since DEFINE_CLASS() has constructor return
> a value that gets copied into the local variable in question.
>
> Which is unusable for situations when a part of what constructor is
> doing is insertion of that local variable into a list.
>
> __cleanup() per se is still usable, but... no DEFINE_CLASS for that kind
> of data structures ;-/
Just add the custom infrastructure that we need for this to work out imho.
If it's useful outside of our own realm then we can add it to cleanup.h
and if not we can just add our own header...
Powered by blists - more mailing lists