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: <aD1ljiG3cFF1TS9P@google.com>
Date: Mon, 2 Jun 2025 08:49:18 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Alexandre Courbot <acourbot@...dia.com>
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>, Benno Lossin <lossin@...nel.org>, 
	Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>, 
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/4] rust: a few common Borrow/BorrowMut implementations

On Sun, Jun 01, 2025 at 12:00:38PM +0900, Alexandre Courbot wrote:
> The Borrow trait has multiple uses, one of them being to store either an
> owned value or a reference to it inside a generic container. This series
> adds these implementations for `Box`, `Arc`, `Vec`, and `CString`. I
> came across the need for this while experimenting with the scatterlist
> abstraction series [1].
> 
> This series provides just the `Borrow` and `BorrowMut` implementations,
> but another common use of `Borrow` in the standard library is to use the
> borrowed type for key lookups in collections. For this to work, a few
> consistency traits (`Eq`, `Hash`, and `Ord`) need to be implemented. I
> am not sure whether we want this on kernel types as well, but please let
> me know if we do and I will add them in the next revision.
> 
> [1] https://lore.kernel.org/rust-for-linux/DA9JTYA0EQU8.26M0ZX80FOBWY@nvidia.com/
> 
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>

Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ