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]
Date: Fri, 23 Feb 2024 11:49:15 +0100
From: Alice Ryhl <aliceryhl@...gle.com>
To: Boqun Feng <boqun.feng@...il.com>
Cc: mathys35.gasnier@...il.com, Miguel Ojeda <ojeda@...nel.org>, 
	Alex Gaynor <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...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@...sung.com>, 
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] rust: locks: Add `get_mut` method to `Lock`

On Fri, Feb 23, 2024 at 3:52 AM Boqun Feng <boqun.feng@...il.com> wrote:
> BTW, while we are at it, I think we should document the
> "structural/non-structural pinning" design decisions somewhere, for
> example in the struct definition:
>
>         #[pin_data]
>         pub struct Lock<T: ?Sized, B: Backend> {
>             ...
>             /// The data protected by the lock.
>             /// This field is non-structural pinned.
>             pub(crate) data: UnsafeCell<T>,
>         }
>
> Thoughts? Or do we think "non-structural pinned" should be the default
> case so no need to document it? I want to have a clear document for each
> field to avoid the accidental "everyone forgets what's the decision
> here" ;-)

I would normally assume that "field is not marked #[pin]" implies that
it's not structurally pinned. But it could still be worth to call out
here.

I prefer the wording "not structurally pinnned" over "non-structural pinned".

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ