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]
Message-ID: <Z1bFn1uvu5M-2H9l@pollux.localdomain>
Date: Mon, 9 Dec 2024 11:25:35 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: Miguel Ojeda <ojeda@...nel.org>,
	Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Frederic Weisbecker <frederic@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	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>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	Lyude Paul <lyude@...hat.com>, rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 10/14] rust: alloc: add `Box::into_pin`

On Fri, Dec 06, 2024 at 10:25:02PM +0100, Andreas Hindborg wrote:
> "Danilo Krummrich" <dakr@...nel.org> writes:
> 
> > On Fri, Dec 06, 2024 at 08:33:02PM +0100, Andreas Hindborg wrote:
> >> Add an associated function to convert a `Box<T>` into a `Pin<Box<T>>`.
> >
> > What do you need this function for?
> >
> > There is an `impl<T, A> From<Box<T, A>> for Pin<Box<T, A>>` already.
> >
> 
> I didn't realize, but that could work as well. I was rebasing this
> series from before we did our own `Box`, and rust `Box` has this method,
> which I was using.
> 
> At any rate, I think it would make sense to have `into_pin` as well as
> the `From` impl, to match the standard library. We could always
> implement one in terms of the other.

I'm not against that -- one of my earlier allocator series actually even had
this function. However, the feedback was to rather not have it at the time.

As mentioned, I'm still fine with including this function though.

Please implement `ìnto_pin` using the existing `From` trait for the next
iteration.

- Danilo

> 
> 
> Best regards,
> Andreas Hindborg
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ