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: <87frjrene8.fsf@kernel.org>
Date: Wed, 05 Mar 2025 12:18:39 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Benno Lossin" <benno.lossin@...ton.me>
Cc: "Danilo Krummrich" <dakr@...nel.org>,  "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>,  "Alice Ryhl" <aliceryhl@...gle.com>,  "Trevor
 Gross" <tmgross@...ch.edu>,  <rust-for-linux@...r.kernel.org>,
  <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/22] rust: pin-init: move `InPlaceInit` and impls of
 `InPlaceWrite` into the kernel crate

"Benno Lossin" <benno.lossin@...ton.me> writes:

> In order to make pin-init a standalone crate, move kernel-specific code
> directly into the kernel crate. This includes the `InPlaceInit<T>`
> trait, its implementations and the implementations of `InPlaceWrite` for
> `Arc` and `UniqueArc`. All of these use the kernel's error type which
> will become unavailable in pin-init.
>
> Signed-off-by: Benno Lossin <benno.lossin@...ton.me>
> ---
>  rust/kernel/alloc/kbox.rs |   3 +-
>  rust/kernel/init.rs       |  55 +++++++++++++++++
>  rust/kernel/prelude.rs    |   3 +-
>  rust/kernel/sync/arc.rs   |  65 +++++++++++++++++++-
>  rust/pin-init/src/lib.rs  | 125 ++------------------------------------
>  5 files changed, 127 insertions(+), 124 deletions(-)
>

[...]

> --- a/rust/pin-init/src/lib.rs
> +++ b/rust/pin-init/src/lib.rs
> @@ -10,7 +10,7 @@
>  //! To initialize a `struct` with an in-place constructor you will need two things:
>  //! - an in-place constructor,
>  //! - a memory location that can hold your `struct` (this can be the [stack], an [`Arc<T>`],
> -//!   [`UniqueArc<T>`], [`KBox<T>`] or any other smart pointer that implements [`InPlaceInit`]).
> +//!   [`KBox<T>`] or any other smart pointer that supports this library).

Would you not want to remove references to `KBox` here as well? Even
though you don't have to move the impl, I don't imagine `KBox` exist in
user space?


Best regards,
Andreas Hindborg



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ