diff options
author | Alice Ryhl <aliceryhl@google.com> | 2025-03-04 10:26:52 +0000 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2025-03-04 15:42:36 -0500 |
commit | 55e16418dd08fdccb7dc97fb8e975ded7c7ade9c (patch) | |
tree | f8786ac9fe55e51f4243dde69179f23493f9c4e6 /rust/kernel/task.rs | |
parent | 9ec84f79c5a7a65cd69b5b705a203759665160cd (diff) |
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: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Fiona Behrens <me@kloenk.dev>
[PM: trimmed long description lines, subj tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'rust/kernel/task.rs')
0 files changed, 0 insertions, 0 deletions