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: <D8N1SQ8V7WAQ.21T9FK0YDMKLK@proton.me>
Date: Sat, 22 Mar 2025 19:39:35 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Antonio Hickey <contact@...oniohickey.com>, tamird@...il.com
Cc: a.hindborg@...nel.org, alex.gaynor@...il.com, aliceryhl@...gle.com, bjorn3_gh@...tonmail.com, boqun.feng@...il.com, dakr@...nel.org, gary@...yguo.net, linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org, masahiroy@...nel.org, nathan@...nel.org, nicolas@...sle.eu, ojeda@...nel.org, rust-for-linux@...r.kernel.org, tmgross@...ch.edu
Subject: Re: [PATCH v5 01/17] rust: enable `raw_ref_op` feature

On Sat Mar 22, 2025 at 8:12 PM CET, Antonio Hickey wrote:
> On Sat, Mar 22, 2025 at 02:24:30PM -0400, Tamir Duberstein wrote:
>> On Sat, Mar 22, 2025 at 11:08 AM Antonio Hickey
>> <contact@...oniohickey.com> wrote:
>> > On Sat, Mar 22, 2025 at 10:16:01AM +0000, Benno Lossin wrote:
>> > > On Thu Mar 20, 2025 at 3:07 AM CET, Antonio Hickey wrote:
>> > > > Since Rust 1.82.0 the `raw_ref_op` feature is stable.
>> > > >
>> > > > By enabling this feature we can use `&raw const place` and
>> > > > `&raw mut place` instead of using `addr_of!(place)` and
>> > > > `addr_of_mut!(place)` macros.
>> > > >
>> > > > Allowing 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>
>> > >
>> > > Reviewed-by: Benno Lossin <benno.lossin@...ton.me>
>> > >
>> > > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
>> > > > index 993708d11874..a73aaa028e34 100644
>> > > > --- a/scripts/Makefile.build
>> > > > +++ b/scripts/Makefile.build
>> > > > @@ -224,9 +224,9 @@ $(obj)/%.lst: $(obj)/%.c FORCE
>> > > >     $(call if_changed_dep,cc_lst_c)
>> > > >
>> > > >  # Compile Rust sources (.rs)
>> > > > -# ---------------------------------------------------------------------------
>> > > > +# --------------------------------------------------------------------------------------
>> > >
>> > > Not sure about this change.
>> >
>> > This change is so I could enable the `raw_ref_op` feature for doctests
>> > since the minimum Rust version 1.78 still has `raw_ref_op` as an
>> > expiramental feature, and will throw errors at compile if a doctest uses
>> > it. Is there a better way to do this?
>> 
>> I think Benno is just asking about the extension of the dashed line.
>
> Ahh ok yea that makes sense, thanks Tamir, sorry Benno I misunderstood.

No worries, it is exactly as Tamir said.

> So the reason I extended the dashed line was because before my change 
> the dashed line perfectly aligned with number of characters in the line
> I changed. I figured it was supposed to match the amount of characters
> of the line.
>
> Giving this a deeper look it looks like the all the other dashed lines
> are maxed at 77 characters. 

Yeah that's also what I thought, so I wouldn't change it.

> I will update this.

If you send another version, you can update this, but Miguel might pick
the patch early, he can then remove the change above when taking the
patch (so I wouldn't send a new version just to change this single
line).

---
Cheers,
Benno


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ