Commit c596f77
rust: uaccess: mark UserSliceWriter method inline
When you build the kernel using the llvm-19.1.4-rust-1.83.0-x86_64
toolchain provided by kernel.org with ARCH=x86_64, the following symbol
is generated:
$nm vmlinux | grep ' _R' | rustfilt | rg UserSliceWriter
ffffffff817c3390 T <kernel::uaccess::UserSliceWriter>::write_slice
However, this Rust symbol is a trivial wrapper around the function
copy_from_user. It doesn't make sense to go through a trivial wrapper
for this function, so mark it inline.
After applying this patch, the above command will produce no output.
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Link: Rust-for-Linux#1145
Signed-off-by: Antonio Hickey <contact@antoniohickey.com>1 parent ab2ebb7 commit c596f77
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
0 commit comments