Commit 5c6a903b authored by Alice Ryhl's avatar Alice Ryhl
Browse files

FROMGIT: cred,rust: mark Credential methods 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=arm64, the following symbols
are generated:

$ nm out-linux/vmlinux | grep ' _R'.*Credential | rustfilt
... T <kernel::cred::Credential>::get_secid
... T <kernel::cred::Credential as
        kernel::types::AlwaysRefCounted>::dec_ref
... T <kernel::cred::Credential as
        kernel::types::AlwaysRefCounted>::inc_ref

However, these Rust symbols are trivial wrappers around the functions
security_cred_getsecid, get_cred, and put_cred respectively. It doesn't
make sense to go through a trivial wrapper for these functions, so mark
them inline. Also mark other trivial methods inline to prevent similar
cases in the future.

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

Reviewed-by: default avatarBoqun Feng <boqun.feng@gmail.com>
Reviewed-by: default avatarAndreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
[PM: subject tweak, description line trims]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>

Bug: 403200195
(cherry picked from commit ab938b59
 git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git

 next)
Change-Id: I946dfbeaddc86e622063d282f767be220dd7b94c
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent 98585677
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment