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: <Z5Klf_poby1lbGTl@tardis.local>
Date: Thu, 23 Jan 2025 12:24:31 -0800
From: Boqun Feng <boqun.feng@...il.com>
To: Christian Schrefl <chrisi.schrefl@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...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>,
	Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Lee Jones <lee@...nel.org>, rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Daniel Almeida <daniel.almeida@...labora.com>,
	Danilo Krummrich <dakr@...nel.org>
Subject: Re: [PATCH 1/3] rust: add Aliased type

On Thu, Jan 23, 2025 at 09:18:33PM +0100, Christian Schrefl wrote:
> On 23.01.25 7:25 PM, Boqun Feng wrote:
> > On Thu, Jan 23, 2025 at 07:04:40PM +0100, Christian Schrefl wrote:
> >> Hi Boqun
> >>
> >> On 23.01.25 6:56 PM, Boqun Feng wrote:
> >>> On Thu, Jan 23, 2025 at 11:21:23AM +0100, Christian Schrefl wrote:
> >>> [...]
> >>>>> [1]: https://lore.kernel.org/rust-for-linux/Z407egxOy7oNLpq8@boqun-archlinux/
> >>>>> [2]: https://rust-lang.github.io/rfcs/3467-unsafe-pinned.html#naming
> >>>>
> >>>> I don't particularly care about the name, I mostly used aliased, because that's
> >>>> the name that Alice originally used.
> >>>>
> >>>> `(Always)Shared` seems confusing to me.
> >>>>
> >>>> I guess we can use `UnsafePinned`, but most people won't know what that means,
> >>>
> >>> Hmm.. but doesn't `Aliased` have the same effect, i.e. most people won't
> >>> know what that means? Moreover, people who already knows `UnsafePinned`
> >>> will still take some time to realize "`Aliased` is actually
> >>> `UnsafePinned`
> >>
> >> I guess I'll name it `UnsafePinned` then.
> >>
> >>>
> >>>> also I'm not sure if it's a good Idea to use the same name as a (future) 
> >>>> language type.
> >>>
> >>> The benefit is that we won't re-invent the wheel since `UnsafePinned`
> >>> already does what `Aliased` does here. If we don't have a good name, we
> >>> should use the one that most people are already using. Honestly, at this
> >>> point, I think we should just use the unstable feature unsafe_pinned.
> >>
> >> I think that's not implemented in rustc yet.
> >> At least no implementation is linked in the tracking issue:
> >> https://github.com/rust-lang/rust/issues/125735
> >>
> >> Once that's implemented we can use a `cfg` to disable this 
> >> implementation on new versions that provide it.
> >> (Assuming we use the same API)
> >>
> > 
> > Sounds good to me, thanks!
> 
> From reading the RFC It seems that `UnsafePinned<T>` should contain a `T`
> directly instead of `UnsafeCell<T>` so I should probably also change my 
> version it to match.
> 

Per

	https://github.com/rust-lang/rust/issues/125735#issuecomment-2299183374

, I think you still want to use `UnsafeCell<T>`.

Regards,
Boqun

> Cheers
> Christian
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ