Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust: kernel: uaccess: mark UserSliceReader methods inline #1147

Open
wants to merge 1 commit into
base: rust-next
Choose a base branch
from

Conversation

antonio-hickey
Copy link

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 symbols
are generated:

$nm vmlinux | grep ' _R'.*UserSliceReader | rustfilt
ffffffff817c3320 T kernel::uaccess::UserSliceReader::read_slice
ffffffff817c32b0 T kernel::uaccess::UserSliceReader::read_raw

However, these Rust symbols are trivial wrappers around the functions
copy_from_user, _copy_from_user respectively. It doesn't
make sense to go through a trivial wrapper for these functions, so mark
them inline.

After applying this patch, the above command will produce no output.

Copy link

@KunWuChan KunWuChan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Kunwu Chan kunwu.chan@hotmail.com

@ojeda
Copy link
Member

ojeda commented Mar 19, 2025

Could you please send the review tag to the mailing list? We don't use GitHub PRs anymore nor monitor them for tags. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants