[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03dbef12-cecc-473e-8fb0-c736061f3e04@ralfj.de>
Date: Fri, 2 May 2025 11:00:09 +0200
From: Ralf Jung <post@...fj.de>
To: Christian Schrefl <chrisi.schrefl@...il.com>,
Benno Lossin <lossin@...nel.org>, Sky <sky@...9.dev>,
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>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
Gerald Wisböck <gerald.wisboeck@...ther.ink>
Cc: linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2 1/3] rust: add UnsafePinned type
Hi all,
>> If you have a link to somewhere that explains that hack, then I'd also
>> put it there. I forgot if it's written down somewhere.
>
> I haven't found anything that describes the hack in detail.
> From what I understand its a combination of disabling `noalias`
> [0] (this PR enables it for `Unpin` types) and disabling
> `dereferencable` [1] on `&mut !Unpin` types.
> Related rust issue about this [2].
>
> Maybe Alice, Ralf or someone else form the rust side can provide
> a better reference?
The `!Unpick` hack simply removes `noalias` and `dereferenceable` from `&mut
!Unpin` and `Box<!Unpin>` types (similar to how we already remove `noalias` and
`dereferenceable` from `&!Freeze` types). This is not a stable guarantee and
will probably change in future version of the compiler.
Kind regards,
Ralf
Powered by blists - more mailing lists