Re: [PATCH] rust/kernel/faux: mark Registration methods inline

From: Ethan Carter Edwards
Date: Mon Mar 10 2025 - 15:43:56 EST


On 25/03/10 07:19PM, Greg Kroah-Hartman wrote:
> On Sun, Mar 09, 2025 at 10:14:36PM -0400, Ethan Carter Edwards wrote:
> > When building the kernel on Arch Linux using on x86_64 with tools:
> > $ rustc --version
> > rustc 1.84.0 (9fc6b4312 2025-01-07)
> > $ cargo --version
> > cargo 1.84.0 (66221abde 2024-11-19)
> > $ clang --version
> > clang version 19.1.7
> > Target: x86_64-pc-linux-gnu
> >
> > The following symbols are generated:
> > $ nm vmlinux | rg ' _R' | rustfilt | rg faux
> > ffffffff81959ae0 T <kernel::faux::Registration>::new
> > ffffffff81959b40 T <kernel::faux::Registration as core::ops::drop::Drop>::drop
> >
> > However, these Rust symbols are wrappers around bindings in the C faux
> > code. Inlining these functions removes the middle-man wrapper function
> > After applying this patch, the above function signatures disappear.
> >
> > Link: https://github.com/Rust-for-Linux/linux/issues/1145
> > Signed-off-by: Ethan Carter Edwards <ethan@xxxxxxxxxxxxxxxxx>
> > ---
> > rust/kernel/faux.rs | 2 ++
> > 1 file changed, 2 insertions(+)
>
> This does not apply to my tree. Can you regenerate it against either
> the driver-core.git driver-core-next branch, or the linux-next tree and
> resend it?

Will do. My apologies, I based this patch off linux-next. I thought it
was customary to use the -next tree for whatever subsystem one is
developing against. I'll do it off of linux-next and send a v2.

>
> What release/branch did you make this against?

Tree: https://github.com/rust-for-linux/linux
Branch: rust-next

>
> thanks,
>
> greg k-h

Thanks,
Ethan