All of lore.kernel.org
 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,
	"Jarkko Sakkinen" <jarkko@kernel.org>,
	"Wedson Almeida Filho" <wedsonaf@google.com>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Geoffrey Thomas" <geofft@ldpreload.com>,
	"Finn Behrens" <me@kloenk.de>,
	"Adam Bratschi-Kaye" <ark.email@gmail.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Sumera Priyadarsini" <sylphrenadin@gmail.com>,
	"Sven Van Asbroeck" <thesven73@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Boris-Chengbiao Zhou" <bobo1239@web.de>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Fox Chen" <foxhlchen@gmail.com>,
	"Dan Robertson" <daniel.robertson@starlab.io>,
	"Viktor Garske" <viktor@v-gar.de>,
	"Dariusz Sosnowski" <dsosnowski@dsosnowski.pl>,
	"Léo Lanteri Thauvin" <leseulartichaut@gmail.com>,
	"Niklas Mohrin" <dev@niklasmohrin.de>,
	"Gioh Kim" <gurugio@gmail.com>, "Daniel Xu" <dxu@dxuuu.xyz>,
	"Milan Landaverde" <milan@mdaverde.com>,
	"Morgan Bartlett" <mjmouse9999@gmail.com>,
	"Maciej Falkowski" <m.falkowski@samsung.com>,
	"Jiapeng Chong" <jiapeng.chong@linux.alibaba.com>,
	"Nándor István Krácser" <bonifaido@gmail.com>,
	"David Gow" <davidgow@google.com>,
	"John Baublitz" <john.m.baublitz@gmail.com>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>
Subject: Re: [PATCH v8 17/31] rust: add `kernel` crate
Date: Tue, 2 Aug 2022 15:34:22 +0200	[thread overview]
Message-ID: <Yukn3vNJ8iGuXgiz@kroah.com> (raw)
In-Reply-To: <20220802015052.10452-18-ojeda@kernel.org>

On Tue, Aug 02, 2022 at 03:50:04AM +0200, Miguel Ojeda wrote:
> From: Wedson Almeida Filho <wedsonaf@google.com>
> 
> The `kernel` crate currently includes all the abstractions that wrap
> kernel features written in C.
> 
> These abstractions call the C side of the kernel via the generated
> bindings with the `bindgen` tool. Modules developed in Rust should
> never call the bindings themselves.
> 
> In the future, as the abstractions grow in number, we may need
> to split this crate into several, possibly following a similar
> subdivision in subsystems as the kernel itself and/or moving
> the code to the actual subsystems.
> 
> Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
> Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
> Co-developed-by: Geoffrey Thomas <geofft@ldpreload.com>
> Signed-off-by: Geoffrey Thomas <geofft@ldpreload.com>
> Co-developed-by: Finn Behrens <me@kloenk.de>
> Signed-off-by: Finn Behrens <me@kloenk.de>
> Co-developed-by: Adam Bratschi-Kaye <ark.email@gmail.com>
> Signed-off-by: Adam Bratschi-Kaye <ark.email@gmail.com>
> Co-developed-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> Co-developed-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
> Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
> Co-developed-by: Sven Van Asbroeck <thesven73@gmail.com>
> Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
> Co-developed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Gary Guo <gary@garyguo.net>
> Co-developed-by: Boris-Chengbiao Zhou <bobo1239@web.de>
> Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
> Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> Co-developed-by: Fox Chen <foxhlchen@gmail.com>
> Signed-off-by: Fox Chen <foxhlchen@gmail.com>
> Co-developed-by: Dan Robertson <daniel.robertson@starlab.io>
> Signed-off-by: Dan Robertson <daniel.robertson@starlab.io>
> Co-developed-by: Viktor Garske <viktor@v-gar.de>
> Signed-off-by: Viktor Garske <viktor@v-gar.de>
> Co-developed-by: Dariusz Sosnowski <dsosnowski@dsosnowski.pl>
> Signed-off-by: Dariusz Sosnowski <dsosnowski@dsosnowski.pl>
> Co-developed-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
> Signed-off-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
> Co-developed-by: Niklas Mohrin <dev@niklasmohrin.de>
> Signed-off-by: Niklas Mohrin <dev@niklasmohrin.de>
> Co-developed-by: Gioh Kim <gurugio@gmail.com>
> Signed-off-by: Gioh Kim <gurugio@gmail.com>
> Co-developed-by: Daniel Xu <dxu@dxuuu.xyz>
> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> Co-developed-by: Milan Landaverde <milan@mdaverde.com>
> Signed-off-by: Milan Landaverde <milan@mdaverde.com>
> Co-developed-by: Morgan Bartlett <mjmouse9999@gmail.com>
> Signed-off-by: Morgan Bartlett <mjmouse9999@gmail.com>
> Co-developed-by: Maciej Falkowski <m.falkowski@samsung.com>
> Signed-off-by: Maciej Falkowski <m.falkowski@samsung.com>
> Co-developed-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Co-developed-by: Nándor István Krácser <bonifaido@gmail.com>
> Signed-off-by: Nándor István Krácser <bonifaido@gmail.com>
> Co-developed-by: David Gow <davidgow@google.com>
> Signed-off-by: David Gow <davidgow@google.com>
> Co-developed-by: John Baublitz <john.m.baublitz@gmail.com>
> Signed-off-by: John Baublitz <john.m.baublitz@gmail.com>
> Co-developed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
> Signed-off-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
> Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
> Co-developed-by: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---
>  rust/kernel/allocator.rs                 |  64 ++
>  rust/kernel/amba.rs                      | 261 +++++++
>  rust/kernel/build_assert.rs              |  83 +++
>  rust/kernel/chrdev.rs                    | 206 ++++++
>  rust/kernel/clk.rs                       |  79 ++
>  rust/kernel/cred.rs                      |  46 ++
>  rust/kernel/delay.rs                     | 104 +++
>  rust/kernel/device.rs                    | 527 ++++++++++++++
>  rust/kernel/driver.rs                    | 442 +++++++++++
>  rust/kernel/error.rs                     | 564 ++++++++++++++
>  rust/kernel/file.rs                      | 887 +++++++++++++++++++++++
>  rust/kernel/fs.rs                        | 846 +++++++++++++++++++++
>  rust/kernel/fs/param.rs                  | 553 ++++++++++++++
>  rust/kernel/gpio.rs                      | 505 +++++++++++++
>  rust/kernel/hwrng.rs                     | 210 ++++++
>  rust/kernel/io_buffer.rs                 | 153 ++++
>  rust/kernel/io_mem.rs                    | 278 +++++++
>  rust/kernel/iov_iter.rs                  |  81 +++
>  rust/kernel/irq.rs                       | 681 +++++++++++++++++
>  rust/kernel/kasync.rs                    |  50 ++
>  rust/kernel/kasync/executor.rs           | 154 ++++
>  rust/kernel/kasync/executor/workqueue.rs | 291 ++++++++
>  rust/kernel/kasync/net.rs                | 322 ++++++++
>  rust/kernel/kunit.rs                     |  91 +++
>  rust/kernel/lib.rs                       | 267 +++++++
>  rust/kernel/linked_list.rs               | 247 +++++++
>  rust/kernel/miscdev.rs                   | 290 ++++++++
>  rust/kernel/mm.rs                        | 149 ++++
>  rust/kernel/module_param.rs              | 499 +++++++++++++
>  rust/kernel/net.rs                       | 392 ++++++++++
>  rust/kernel/net/filter.rs                | 447 ++++++++++++
>  rust/kernel/of.rs                        |  63 ++
>  rust/kernel/pages.rs                     | 144 ++++
>  rust/kernel/platform.rs                  | 223 ++++++
>  rust/kernel/power.rs                     | 118 +++
>  rust/kernel/prelude.rs                   |  36 +
>  rust/kernel/print.rs                     | 406 +++++++++++
>  rust/kernel/random.rs                    |  42 ++
>  rust/kernel/raw_list.rs                  | 361 +++++++++
>  rust/kernel/rbtree.rs                    | 563 ++++++++++++++
>  rust/kernel/revocable.rs                 | 425 +++++++++++
>  rust/kernel/security.rs                  |  38 +
>  rust/kernel/static_assert.rs             |  34 +
>  rust/kernel/std_vendor.rs                | 161 ++++
>  rust/kernel/str.rs                       | 597 +++++++++++++++
>  rust/kernel/sync.rs                      |  48 +-
>  rust/kernel/sysctl.rs                    | 199 +++++
>  rust/kernel/task.rs                      | 239 ++++++
>  rust/kernel/types.rs                     | 705 ++++++++++++++++++
>  rust/kernel/unsafe_list.rs               | 680 +++++++++++++++++
>  rust/kernel/user_ptr.rs                  | 175 +++++
>  rust/kernel/workqueue.rs                 | 512 +++++++++++++
>  52 files changed, 15518 insertions(+), 20 deletions(-)

This is huge for a single commit, and pretty much impossible to review
as-is.

Any chance you can turn this into a series of commits, that starts with
the basics and builds on top of that?  Right now you are mixing many
many different subsystems all at once into one commit, guaranteeing that
no one can review the whole thing properly :(

thanks,

greg k-h

  reply	other threads:[~2022-08-02 13:34 UTC|newest]

Thread overview: 129+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02  1:49 [PATCH v8 00/31] Rust support Miguel Ojeda
2022-08-02  1:49 ` Miguel Ojeda
2022-08-02  1:49 ` Miguel Ojeda
2022-08-02  1:49 ` Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 01/31] kallsyms: use `sizeof` instead of hardcoded size Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 02/31] kallsyms: avoid hardcoding buffer size Miguel Ojeda
2022-08-02  8:29   ` David Laight
2022-08-02  9:45     ` Rasmus Villemoes
2022-08-02  1:49 ` [PATCH v8 03/31] kallsyms: add static relationship between `KSYM_NAME_LEN{,_BUFFER}` Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 04/31] kallsyms: support "big" kernel symbols Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 05/31] kallsyms: increase maximum kernel symbol length to 512 Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 06/31] workqueue: introduce `__INIT_WORK_WITH_KEY` Miguel Ojeda
2022-08-15 21:14   ` Tejun Heo
2022-08-15 21:53     ` Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 07/31] locking/spinlock: introduce `__spin_lock_init` Miguel Ojeda
2022-08-03 20:58   ` Boqun Feng
2022-08-02  1:49 ` [PATCH v8 08/31] locking/spinlock: introduce `_raw_spin_lock_init` Miguel Ojeda
2022-08-03 21:00   ` Boqun Feng
2022-08-02  1:49 ` [PATCH v8 09/31] rust: add C helpers Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 10/31] rust: add `compiler_builtins` crate Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 11/31] rust: import upstream `alloc` crate Miguel Ojeda
2022-08-02  1:49 ` [PATCH v8 12/31] rust: adapt `alloc` crate to the kernel Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 13/31] rust: add `build_error` crate Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 14/31] rust: add `macros` crate Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 15/31] rust: add `bindings` crate Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 16/31] rust: add `kernel` crate's `sync` module Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 17/31] rust: add `kernel` crate Miguel Ojeda
2022-08-02 13:34   ` Greg Kroah-Hartman [this message]
2022-08-02 14:33     ` Miguel Ojeda
2022-08-02 14:36       ` Greg Kroah-Hartman
2022-08-02 14:53         ` Miguel Ojeda
2022-08-03  7:30           ` Greg Kroah-Hartman
2022-08-02  1:50 ` [PATCH v8 18/31] rust: export generated symbols Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 19/31] vsprintf: add new `%pA` format specifier Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 20/31] scripts: checkpatch: diagnose uses of `%pA` in the C side as errors Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 21/31] scripts: checkpatch: enable language-independent checks for Rust Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 22/31] scripts: add `rustdoc_test_{builder,gen}.py` scripts Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 23/31] scripts: add `generate_rust_analyzer.py` scripts Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 24/31] scripts: decode_stacktrace: demangle Rust symbols Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 25/31] configs: add `rust` config Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 26/31] docs: add Rust documentation Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 27/31] Kbuild: add Rust support Miguel Ojeda
2022-08-02  1:50   ` Miguel Ojeda
2022-08-02  1:50   ` Miguel Ojeda
2022-08-02  1:50   ` Miguel Ojeda
2022-08-02  1:50   ` Miguel Ojeda
2022-08-17 14:39   ` Arnd Bergmann
2022-08-17 14:39     ` Arnd Bergmann
2022-08-17 14:39     ` Arnd Bergmann
2022-08-17 14:39     ` Arnd Bergmann
2022-08-17 14:39     ` Arnd Bergmann
2022-08-17 15:13     ` Miguel Ojeda
2022-08-17 15:13       ` Miguel Ojeda
2022-08-17 15:13       ` Miguel Ojeda
2022-08-17 15:13       ` Miguel Ojeda
2022-08-17 15:24       ` Arnd Bergmann
2022-08-17 15:24         ` Arnd Bergmann
2022-08-17 15:24         ` Arnd Bergmann
2022-08-17 23:13         ` Miguel Ojeda
2022-08-17 23:13           ` Miguel Ojeda
2022-08-17 23:13           ` Miguel Ojeda
2022-08-17 23:13           ` Miguel Ojeda
2022-08-17 16:11       ` Björn Roy Baron
2022-08-17 16:11         ` Björn Roy Baron
2022-08-17 16:11         ` Björn Roy Baron
2022-08-17 16:11         ` Björn Roy Baron
2022-08-17 22:42         ` Miguel Ojeda
2022-08-17 22:42           ` Miguel Ojeda
2022-08-17 22:42           ` Miguel Ojeda
2022-08-17 22:42           ` Miguel Ojeda
2022-09-06 18:08   ` Masahiro Yamada
2022-09-06 18:08     ` Masahiro Yamada
2022-09-06 18:08     ` Masahiro Yamada
2022-09-06 18:08     ` Masahiro Yamada
2022-09-06 18:08     ` Masahiro Yamada
2022-09-06 23:34     ` Michael Ellerman
2022-09-06 23:34       ` Michael Ellerman
2022-09-06 23:34       ` Michael Ellerman
2022-09-06 23:34       ` Michael Ellerman
2022-09-06 23:34       ` Michael Ellerman
2022-08-02  1:50 ` [PATCH v8 28/31] samples: add Rust examples Miguel Ojeda
2022-08-02 14:07   ` Konstantin Shelekhin
2022-08-02 20:04     ` Wei Liu
2022-08-03  9:23       ` Konstantin Shelekhin
2022-08-04 20:31     ` Miguel Ojeda
2022-08-05 11:40       ` Konstantin Shelekhin
2022-08-06 11:58         ` Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 29/31] MAINTAINERS: Rust Miguel Ojeda
2022-08-02  2:25   ` Boqun Feng
2022-08-02  3:41     ` Miguel Ojeda
2022-08-02 14:53     ` Gary Guo
2022-08-04 10:15     ` bjorn3
2022-08-02  1:50 ` [PATCH v8 30/31] [RFC] drivers: gpio: PrimeCell PL061 in Rust Miguel Ojeda
2022-08-02  1:50 ` [PATCH v8 31/31] [RFC] drivers: android: Binder IPC " Miguel Ojeda
2022-08-02 12:26 ` [PATCH v8 00/31] Rust support Matthew Wilcox
2022-08-02 12:26   ` Matthew Wilcox
2022-08-02 12:26   ` Matthew Wilcox
2022-08-02 12:26   ` Matthew Wilcox
2022-08-02 12:26   ` Matthew Wilcox
2022-08-02 13:45   ` Miguel Ojeda
2022-08-02 13:45     ` Miguel Ojeda
2022-08-02 13:45     ` Miguel Ojeda
2022-08-02 13:45     ` Miguel Ojeda
2022-08-02 13:45     ` Miguel Ojeda
2022-08-02 13:48     ` Christoph Hellwig
2022-08-02 13:48       ` Christoph Hellwig
2022-08-02 13:48       ` Christoph Hellwig
2022-08-02 13:48       ` Christoph Hellwig
2022-08-02 13:48       ` Christoph Hellwig
2022-08-02 14:16       ` Miguel Ojeda
2022-08-02 14:16         ` Miguel Ojeda
2022-08-02 14:16         ` Miguel Ojeda
2022-08-02 14:16         ` Miguel Ojeda
2022-08-02 14:16         ` Miguel Ojeda
2022-08-02 14:01     ` Matthew Wilcox
2022-08-02 14:01       ` Matthew Wilcox
2022-08-02 14:01       ` Matthew Wilcox
2022-08-02 14:01       ` Matthew Wilcox
2022-08-02 14:01       ` Matthew Wilcox
2022-08-02 15:09       ` Miguel Ojeda
2022-08-02 15:09         ` Miguel Ojeda
2022-08-02 15:09         ` Miguel Ojeda
2022-08-02 15:09         ` Miguel Ojeda
2022-08-02 15:09         ` Miguel Ojeda
2022-08-02 17:46         ` Miguel Ojeda
2022-08-02 17:46           ` Miguel Ojeda
2022-08-02 17:46           ` Miguel Ojeda
2022-08-02 17:46           ` Miguel Ojeda
2022-08-02 17:46           ` Miguel Ojeda

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=Yukn3vNJ8iGuXgiz@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alex.gaynor@gmail.com \
    --cc=ark.email@gmail.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=bobo1239@web.de \
    --cc=bonifaido@gmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=daniel.robertson@starlab.io \
    --cc=davidgow@google.com \
    --cc=dev@niklasmohrin.de \
    --cc=dsosnowski@dsosnowski.pl \
    --cc=dxu@dxuuu.xyz \
    --cc=foxhlchen@gmail.com \
    --cc=gary@garyguo.net \
    --cc=geofft@ldpreload.com \
    --cc=gurugio@gmail.com \
    --cc=jarkko@kernel.org \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=john.m.baublitz@gmail.com \
    --cc=leseulartichaut@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.falkowski@samsung.com \
    --cc=me@kloenk.de \
    --cc=milan@mdaverde.com \
    --cc=mjmouse9999@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sylphrenadin@gmail.com \
    --cc=thesven73@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viktor@v-gar.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.