[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb6c111c-4854-4166-94d0-f45d4f6e7018@efficios.com>
Date: Fri, 17 Oct 2025 09:41:35 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Thomas Gleixner <tglx@...utronix.de>, LKML <linux-kernel@...r.kernel.org>
Cc: kernel test robot <lkp@...el.com>, Russell King <linux@...linux.org.uk>,
linux-arm-kernel@...ts.infradead.org,
Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
linuxppc-dev@...ts.ozlabs.org, Paul Walmsley <pjw@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>, linux-riscv@...ts.infradead.org,
Heiko Carstens <hca@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, linux-s390@...r.kernel.org,
Andrew Cooper <andrew.cooper3@...rix.com>,
Julia Lawall <Julia.Lawall@...ia.fr>, Nicolas Palix <nicolas.palix@...g.fr>,
Peter Zijlstra <peterz@...radead.org>, Darren Hart <dvhart@...radead.org>,
Davidlohr Bueso <dave@...olabs.net>, André Almeida
<andrealmeid@...lia.com>, Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
linux-fsdevel@...r.kernel.org
Subject: Re: [patch V3 08/12] uaccess: Provide put/get_user_masked()
On 2025-10-17 06:09, Thomas Gleixner wrote:
> Provide conveniance wrappers around scoped masked user access similiar to
convenience
similar
> +/**
> + * get_user_masked - Read user data with masked access
> + * @_val: The variable to store the value read from user memory
> + * @_usrc: Pointer to the user space memory to read from
> + *
> + * Return: true if successful, false when faulted
^ '.' (or not) across sentences. Your choice, but it's irregular across
the series.
> + */
> +#define get_user_masked(_val, _usrc) \
> +({ \
> + __label__ efault; \
> + typeof((_usrc)) _tmpsrc = (_usrc); \
Remove extra () around _usrc in typeof.
UNIQUE_ID for _tmpsrc ?
> + bool ____ret = true; \
Why so many underscores ? It there are nesting concerns,
it may be a sign that UNIQUE_ID is needed.
> + */
> +#define put_user_masked(_val, _udst) \
> +({ \
> + __label__ efault; \
> + typeof((_udst)) _tmpdst = (_udst); \
Remove extra () around _udst in typeof.
UNIQUE_ID for _tmpsrc ?
> + bool ____ret = true;
UNIQUE_ID for ____ret ?
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Powered by blists - more mailing lists