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: <878qjeclq1.fsf@t14s.mail-host-address-is-not-set>
Date: Wed, 20 Aug 2025 12:48:38 +0200
From: Andreas Hindborg <a.hindborg@...nel.org>
To: Benno Lossin <lossin@...nel.org>, Oliver Mangold <oliver.mangold@...me>
Cc: 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>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor
 Gross <tmgross@...ch.edu>, Asahi Lina <lina+kernel@...hilina.net>,
 rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v11 1/4] rust: types: Add Ownable/Owned types

"Benno Lossin" <lossin@...nel.org> writes:

> On Tue Aug 19, 2025 at 11:00 AM CEST, Andreas Hindborg wrote:
>> "Oliver Mangold" <oliver.mangold@...me> writes:
>>> You mean of `Ownable`, when `OwnableMut` is removed? Yes. A good question
>>> in that context is, what it actually means to have an `&mut Opaque<T>`
>>> where `T` is `Unpin`. If that implies being allowed to obtain an `&mut T`,
>>> it would we easy, I guess.
>>
>> You should not be able to get a `&mut T` from a `&mut Opaque<T>`.
>> `Opaque` opts out of invariants that normally hold for rust references.
>
> Yes, that function mustn't exist.
>
>>> But what I am wondering is, if we actually want to start using `Pin`
>>> at all. Isn't `Opaque` currently used about everywhere pinning is needed?
>>
>> `Opaque` is `!Unpin`, but pinning guarantees does not come into effect
>> until we produce a `Pin<Opaque<T>>`.
>
> `Pin<Opaque<T>>` isn't really a thing. You still need a pointer
> indirection, so `Pin<P>` where `P: DerefMut<Target = Opaque<T>>` so for
> example `Pin<Box<Opaque<T>>>`.

Right, that is what I meant, but not what I typed. Thanks for pointing
that out :)


Best regards,
Andreas Hindborg




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ