Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Open
antonio-hickey wants to merge 1 commit into Rust-for-Linux:rust-next
base: rust-next
Choose a base branch
Loading
from antonio-hickey:rust-next

Conversation

@antonio-hickey
Copy link

@antonio-hickey antonio-hickey commented Mar 11, 2025

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

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!

@ojeda ojeda force-pushed the rust-next branch 5 times, most recently from bfc3cd8 to a3b2347 Compare May 27, 2025 18:27
@ojeda ojeda force-pushed the rust-next branch 3 times, most recently from 5d132fa to 3b83f5d Compare October 22, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@KunWuChan KunWuChan KunWuChan left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /