lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f52b83c88d715ac3ae989427bcc20030@paul-moore.com>
Date: Tue, 04 Mar 2025 17:07:48 -0500
From: Paul Moore <paul@...l-moore.com>
To: Alice Ryhl <aliceryhl@...gle.com>, James Morris <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>, Christian Brauner <brauner@...nel.org>
Cc: Jens Axboe <axboe@...nel.dk>, Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, "Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>, rust-for-linux@...r.kernel.org, linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org, Christian Brauner <brauner@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>
Subject: Re: [PATCH v2] cred: rust: mark Credential methods inline

On Mar  4, 2025 Alice Ryhl <aliceryhl@...gle.com> wrote:
> 
> 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
> ffffffc0808fc540 T <kernel::cred::Credential>::get_secid
> ffffffc0808fc588 T <kernel::cred::Credential as kernel::types::AlwaysRefCounted>::dec_ref
> ffffffc0808fc570 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: Boqun Feng <boqun.feng@...il.com>
> Reviewed-by: Andreas Hindborg <a.hindborg@...nel.org>
> Reviewed-by: Christian Brauner <brauner@...nel.org>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
> ---
> Changes in v2:
> - Reword commit message.
> - Link to v1: https://lore.kernel.org/r/20250303-inline-cred-v1-1-b2527beace76@google.com
> ---
>  rust/kernel/cred.rs | 5 +++++
>  1 file changed, 5 insertions(+)

Merged into lsm/dev, thanks everyone!

--
paul-moore.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ