[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkWhs1GffuUmZ4SC@kroah.com>
Date: Thu, 31 Mar 2022 14:42:27 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...gle.com>,
Gary Guo <gary@...yguo.net>, Matthew Bakhtiari <dev@...k.me>
Subject: Re: [PATCH v5 06/20] rust: add `alloc` crate
On Thu, Mar 17, 2022 at 07:09:54PM +0100, Miguel Ojeda wrote:
> This crate is a subset of the Rust standard library `alloc`, with some
> additions on top.
>
> This is needed because upstream support for fallible allocations
> is a work in progress (i.e. the `try_*` versions of methods which
> return a `Result` instead of panicking).
>
> Having the library in-tree also gives us a bit more freedom to
> experiment with new interfaces and allows us to iterate quickly.
>
> Eventually, the goal is to have everything the kernel needs in
> upstream `alloc` and drop it from the kernel tree.
>
> Co-developed-by: Alex Gaynor <alex.gaynor@...il.com>
> Signed-off-by: Alex Gaynor <alex.gaynor@...il.com>
> Co-developed-by: Wedson Almeida Filho <wedsonaf@...gle.com>
> Signed-off-by: Wedson Almeida Filho <wedsonaf@...gle.com>
> Co-developed-by: Gary Guo <gary@...yguo.net>
> Signed-off-by: Gary Guo <gary@...yguo.net>
> Co-developed-by: Matthew Bakhtiari <dev@...k.me>
> Signed-off-by: Matthew Bakhtiari <dev@...k.me>
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
> ---
> rust/alloc/README.md | 32 +
> rust/alloc/alloc.rs | 440 ++++
> rust/alloc/borrow.rs | 498 +++++
> rust/alloc/boxed.rs | 2008 +++++++++++++++++
> rust/alloc/collections/mod.rs | 156 ++
> rust/alloc/fmt.rs | 601 ++++++
> rust/alloc/lib.rs | 231 ++
> rust/alloc/macros.rs | 126 ++
> rust/alloc/raw_vec.rs | 561 +++++
> rust/alloc/slice.rs | 1279 +++++++++++
> rust/alloc/str.rs | 632 ++++++
> rust/alloc/string.rs | 2862 ++++++++++++++++++++++++
> rust/alloc/vec/drain.rs | 186 ++
> rust/alloc/vec/drain_filter.rs | 145 ++
> rust/alloc/vec/into_iter.rs | 356 +++
> rust/alloc/vec/is_zero.rs | 106 +
> rust/alloc/vec/mod.rs | 3353 +++++++++++++++++++++++++++++
> rust/alloc/vec/partial_eq.rs | 49 +
> rust/alloc/vec/set_len_on_drop.rs | 30 +
> rust/alloc/vec/spec_extend.rs | 174 ++
> 20 files changed, 13825 insertions(+)
This is a huge patch. Why not break it into 2, one that adds what is
upstream, and then the second adds the "stuff on top" that you need for
the kernel. Otherwise it's hard to know what is, and is not, upstream
for us to be able to review from a kernel point of view.
I think you are trying to do this with the "kernel" keyword, but if so,
why are you picking a "since" of 1.0? None of that is described in the
changelog :(
thanks,
greg k-h
Powered by blists - more mailing lists