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: <D8HM15XV9W1G.I3I2N7MWWK2P@proton.me>
Date: Sun, 16 Mar 2025 10:14:58 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Antonio Hickey <contact@...e-forge.io>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>
Cc: Antonio Hickey <contact@...oniohickey.com>, rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 02/16] rust: init: refactor to use `&raw [const|mut]`

On Sun Mar 16, 2025 at 7:14 AM CET, Antonio Hickey wrote:
> Replacing all occurrences of `addr_of!(place)` and `addr_of_mut!(place)`
> with `&raw const place` and `&raw mut place` respectively.
>
> This will allow us to reduce macro complexity, and improve consistency
> with existing reference syntax as `&raw const`, `&raw mut` are similar
> to `&`, `&mut` making it fit more naturally with other existing code.
>
> Suggested-by: Benno Lossin <benno.lossin@...ton.me>
> Link: https://github.com/Rust-for-Linux/linux/issues/1148
> Signed-off-by: Antonio Hickey <contact@...oniohickey.com>
> ---
>  rust/kernel/init.rs        |  8 ++++----
>  rust/kernel/init/macros.rs | 28 ++++++++++++++--------------
>  2 files changed, 18 insertions(+), 18 deletions(-)

When compiling this on Rust 1.78, I get:

    error[E0658]: raw address of syntax is experimental
      --> drivers/block/rnull.rs:57:9
       |
    57 | /         try_pin_init!(Self {
    58 | |             _disk <- new_mutex!(disk?, "nullb:disk"),
    59 | |         })
       | |__________^
       |
       = note: see issue #64490 <https://github.com/rust-lang/rust/issues/64490> for more information
       = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable
       = note: this compiler was built on 2024-04-29; consider upgrading it if it is out of date
       = note: this error originates in the macro `$crate::__init_internal` which comes from the expansion of the macro `try_pin_init` (in Nightly builds, run with -Z macro-backtrace for more info)

So the previous commit also needs to affect doctests.

---
Cheers,
Benno


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ