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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250122163816.4a8e987b.gary@garyguo.net>
Date: Wed, 22 Jan 2025 16:38:16 +0000
From: Gary Guo <gary@...yguo.net>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
 Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin
 <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, Alice
 Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
 rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
 patches@...ts.linux.dev
Subject: Re: [PATCH] rust: init: use explicit ABI to clean warning in future
 compilers

On Tue, 21 Jan 2025 21:09:34 +0100
Miguel Ojeda <ojeda@...nel.org> wrote:

> Starting with Rust 1.86.0 (currently in nightly, to be released on
> 2025-04-03), the `missing_abi` lint is warn-by-default [1]:
> 
>     error: extern declarations without an explicit ABI are deprecated
>         --> rust/doctests_kernel_generated.rs:3158:1  
>          |
>     3158 | extern {
>          | ^^^^^^ help: explicitly specify the C ABI: `extern "C"`
>          |
>          = note: `-D missing-abi` implied by `-D warnings`
>          = help: to override `-D warnings` add `#[allow(missing_abi)]`
> 
> Thus clean it up.
> 
> Link: https://github.com/rust-lang/rust/pull/132397 [1]
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>

Reviewed-by: Gary Guo <gary@...yguo.net>

> ---
>  rust/kernel/init.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs
> index 347049df556b..c962029f96e1 100644
> --- a/rust/kernel/init.rs
> +++ b/rust/kernel/init.rs
> @@ -854,7 +854,7 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {
>      /// use kernel::{types::Opaque, init::pin_init_from_closure};
>      /// #[repr(C)]
>      /// struct RawFoo([u8; 16]);
> -    /// extern {
> +    /// extern "C" {
>      ///     fn init_foo(_: *mut RawFoo);
>      /// }
>      ///
> 
> base-commit: 100ceb4817a2ac650e29f107cf97161ce3e2289a


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ