Commit 98585677 authored by Alice Ryhl's avatar Alice Ryhl
Browse files

FROMGIT: lsm,rust: mark SecurityCtx 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 vmlinux | grep ' _R'.*SecurityCtx | rustfilt
... T <kernel::security::SecurityCtx>::from_secid
... T <kernel::security::SecurityCtx as core::ops::drop::Drop>::drop

However, these Rust symbols are trivial wrappers around the functions
security_secid_to_secctx and security_release_secctx 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 avatarAndreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarFiona Behrens <me@kloenk.dev>
[PM: trimmed long description lines, subj tweak]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>

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

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