[patch V3 08/12] uaccess: Provide put/get_user_masked()
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Sat Oct 18 00:41:35 AEDT 2025
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
More information about the Linuxppc-dev
mailing list