aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
authorYury Norov <ynorov@nvidia.com>2026-04-24 22:08:56 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-05-28 21:24:44 -0700
commitc02be2ad2b88c67c5d7c06b6aa7083b5b40e1077 (patch)
tree2d0f83c3809041595192009a653ddec6daeca92a /rust
parentf829d4d911cc296b32d14436a8a517e907228475 (diff)
downloadlinux-next-history-c02be2ad2b88c67c5d7c06b6aa7083b5b40e1077.tar.gz
uaccess: unify inline vs outline copy_{from,to}_user() selection
The kernel allows arches to select between inline and outline implementations of the copy_{from,to}_user() by defining individual INLINE_COPY_FROM_USER and INLINE_COPY_TO_USER, correspondingly. However, all arches enable or disable them always together. Without the real use-case for one helper being inlined while the other outlined, having independent controls is excessive and error prone. Switch the codebase to the single unified INLINE_COPY_USER control. Link: https://lore.kernel.org/20260425020857.356850-3-ynorov@nvidia.com Signed-off-by: Yury Norov <ynorov@nvidia.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Viktor Malik <vmalik@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'rust')
-rw-r--r--rust/helpers/uaccess.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/rust/helpers/uaccess.c b/rust/helpers/uaccess.c
index aff22f16ab388..6e59cc9c665cc 100644
--- a/rust/helpers/uaccess.c
+++ b/rust/helpers/uaccess.c
@@ -14,15 +14,13 @@ rust_helper_copy_to_user(void __user *to, const void *from, unsigned long n)
return copy_to_user(to, from, n);
}
-#ifdef INLINE_COPY_FROM_USER
+#ifdef INLINE_COPY_USER
__rust_helper
unsigned long rust_helper__copy_from_user(void *to, const void __user *from, unsigned long n)
{
return _inline_copy_from_user(to, from, n);
}
-#endif
-#ifdef INLINE_COPY_TO_USER
__rust_helper
unsigned long rust_helper__copy_to_user(void __user *to, const void *from, unsigned long n)
{