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