diff options
| author | Arnd Bergmann <[email protected]> | 2024-05-28 14:58:03 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2024-07-08 21:44:01 +0000 |
| commit | 1f9a8286bc0c3df7d789ea625d9d9db3d7779f2d (patch) | |
| tree | 9abdf014774dd6862a8899462cf0ca472ed59863 /rust/helpers.c | |
| parent | rust: uaccess: add userspace pointers (diff) | |
| download | kernel-1f9a8286bc0c3df7d789ea625d9d9db3d7779f2d.tar.gz kernel-1f9a8286bc0c3df7d789ea625d9d9db3d7779f2d.zip | |
uaccess: always export _copy_[from|to]_user with CONFIG_RUST
Rust code needs to be able to access _copy_from_user and _copy_to_user
so that it can skip the check_copy_size check in cases where the length
is known at compile-time, mirroring the logic for when C code will skip
check_copy_size. To do this, we ensure that exported versions of these
methods are available when CONFIG_RUST is enabled.
Alice has verified that this patch passes the CONFIG_TEST_USER_COPY test
on x86 using the Android cuttlefish emulator.
Signed-off-by: Arnd Bergmann <[email protected]>
Tested-by: Alice Ryhl <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Alice Ryhl <[email protected]>
Acked-by: Andrew Morton <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions
