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: <aDoIrq6YCh-KwV4S@Mac.home>
Date: Fri, 30 May 2025 12:36:14 -0700
From: Boqun Feng <boqun.feng@...il.com>
To: Benno Lossin <lossin@...nel.org>
Cc: Christian Schrefl <chrisi.schrefl@...il.com>,
	Danilo Krummrich <dakr@...nel.org>, gregkh@...uxfoundation.org,
	rafael@...nel.org, ojeda@...nel.org, alex.gaynor@...il.com,
	gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
	a.hindborg@...nel.org, aliceryhl@...gle.com, tmgross@...ch.edu,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/7] misc device: support device drivers

On Fri, May 30, 2025 at 12:35:21PM -0700, Boqun Feng wrote:
> On Fri, May 30, 2025 at 09:24:28PM +0200, Benno Lossin wrote:
> > On Fri May 30, 2025 at 7:29 PM CEST, Christian Schrefl wrote:
> > > On 30.05.25 6:37 PM, Christian Schrefl wrote:
> > >> On 30.05.25 4:24 PM, Danilo Krummrich wrote:
> > >>> This patch series adds support for device drivers to the misc device
> > >>> abstraction.
> > >>>
> > >>> For design details, please see:
> > >>>   * patch 5 "rust: miscdevice: properly support device drivers"
> > >>>   * patch 6 "rust: miscdevice: expose the parent device as &Device<Bound>"
> > >>>
> > >>> This patch series depends on the pin-init series from Benno [1] as well as on
> > >>> the misc device series from Christian [2], with UnsafePinned replaced with
> > >>> Opaque, as suggested by Alice, since UnsafePinned may still take a while to
> > >>> land.
> 
> Maybe I'm missing something, but don't we have our own version of
> `UnsafePinned` [1] which can be replaced once Rust upstream has the
> `UnsafePinned` stabilized. I don't see any discussion about abandoning
> that effort.
> 

Missing the link..

[1]: https://lore.kernel.org/rust-for-linux/20250430-rust_unsafe_pinned-v2-0-fc8617a74024@gmail.com/

> Regards,
> Boqun
> 
> > >> 
> > >> If you want I can send out a new version using `Opaque`.
> > >> 
> > >> We could also add a type alias like:
> > >> 
> > >> type UnsafePinned<T> = Opaque<T>;
> > >
> > > I forgot that Opaque doesn't drop, this would not be quite as simple,
> > > but with a newtype with a `Drop` impl it should be possible.
> > 
> > That's one issue another is that `Opaque` also allows uninitialized
> > memory and (if the upstream one isn't changed) also modifies the
> > behavior of shared references. I don't think we should name it
> > `UnsafePinned` if it doesn't guarantee the same thing as the upstream
> > one.
> > 
> > ---
> > Cheers,
> > Benno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ