rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alex Gaynor <alex.gaynor@gmail.com>,
	Wedson Almeida Filho <wedsonaf@google.com>,
	Gary Guo <gary@garyguo.net>, Matthew Bakhtiari <dev@mtbk.me>
Subject: Re: [PATCH v5 06/20] rust: add `alloc` crate
Date: Thu, 31 Mar 2022 14:42:27 +0200	[thread overview]
Message-ID: <YkWhs1GffuUmZ4SC@kroah.com> (raw)
In-Reply-To: <20220317181032.15436-7-ojeda@kernel.org>

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@gmail.com>
> Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
> Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
> Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
> Co-developed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Gary Guo <gary@garyguo.net>
> Co-developed-by: Matthew Bakhtiari <dev@mtbk.me>
> Signed-off-by: Matthew Bakhtiari <dev@mtbk.me>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.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

  parent reply	other threads:[~2022-03-31 12:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 18:09 [PATCH v5 00/20] Rust support Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 01/20] kallsyms: support "big" kernel symbols Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 02/20] kallsyms: increase maximum kernel symbol length to 512 Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 03/20] kallsyms: use the correct buffer size for symbols Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 04/20] rust: add C helpers Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 05/20] rust: add `compiler_builtins` crate Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 07/20] rust: add `build_error` crate Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 08/20] rust: add `macros` crate Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 09/20] rust: add `kernel` crate's `sync` module Miguel Ojeda
2022-03-17 18:09 ` [PATCH v5 11/20] rust: export generated symbols Miguel Ojeda
2022-03-17 18:10 ` [PATCH v5 12/20] vsprintf: add new `%pA` format specifier Miguel Ojeda
2022-03-18 14:07   ` Andy Shevchenko
2022-03-18 16:04     ` Petr Mladek
2022-03-22  4:16       ` Sergey Senozhatsky
2022-03-17 18:10 ` [PATCH v5 13/20] scripts: add `generate_rust_analyzer.py` Miguel Ojeda
2022-03-17 18:10 ` [PATCH v5 14/20] scripts: decode_stacktrace: demangle Rust symbols Miguel Ojeda
2022-03-17 18:10 ` [PATCH v5 16/20] Kbuild: add Rust support Miguel Ojeda
2022-03-17 18:10 ` [PATCH v5 17/20] samples: add Rust examples Miguel Ojeda
2022-03-17 18:10 ` [PATCH v5 18/20] MAINTAINERS: Rust Miguel Ojeda
2022-03-17 18:10 ` [PATCH v5 19/20] [RFC] drivers: gpio: PrimeCell PL061 in Rust Miguel Ojeda
     [not found] ` <20220317181032.15436-7-ojeda@kernel.org>
2022-03-31 12:42   ` Greg Kroah-Hartman [this message]
2022-03-31 13:19     ` [PATCH v5 06/20] rust: add `alloc` crate Miguel Ojeda
2022-03-31 13:35       ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YkWhs1GffuUmZ4SC@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alex.gaynor@gmail.com \
    --cc=dev@mtbk.me \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wedsonaf@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).