[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023110124-enunciate-hypnotize-2ae9@gregkh>
Date: Wed, 1 Nov 2023 19:10:04 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Arve Hjønnevåg <arve@...roid.com>,
Todd Kjos <tkjos@...roid.com>,
Martijn Coenen <maco@...roid.com>,
Joel Fernandes <joel@...lfernandes.org>,
Christian Brauner <brauner@...nel.org>,
Carlos Llamas <cmllamas@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...sung.com>,
Matt Gilbride <mattgilbride@...gle.com>,
Jeffrey Vander Stoep <jeffv@...gle.com>,
Matthew Maurer <mmaurer@...gle.com>
Subject: Re: [PATCH RFC 02/20] rust_binder: add binderfs support to Rust
binder
On Wed, Nov 01, 2023 at 06:01:32PM +0000, Alice Ryhl wrote:
> Add support for accessing the Rust binder driver via binderfs. The
> actual binderfs implementation is done entirely in C, and the
> `rust_binderfs.c` file is a modified version of `binderfs.c` that is
> adjusted to call into the Rust binder driver rather than the C driver.
>
> We have left the binderfs filesystem component in C. Rewriting it in
> Rust would be a large amount of work and requires a lot of bindings to
> the file system interfaces. Binderfs has not historically had the same
> challenges with security and complexity, so rewriting Binderfs seems to
> have lower value than the rest of Binder.
>
> We also add code on the Rust side for binderfs to call into. Most of
> this is left as stub implementation, with the exception of closing the
> file descriptor and the BINDER_VERSION ioctl.
>
> Co-developed-by: Wedson Almeida Filho <wedsonaf@...il.com>
> Signed-off-by: Wedson Almeida Filho <wedsonaf@...il.com>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
> ---
> drivers/android/Kconfig | 24 ++
> drivers/android/Makefile | 1 +
> drivers/android/context.rs | 144 +++++++
> drivers/android/defs.rs | 39 ++
> drivers/android/process.rs | 251 ++++++++++++
> drivers/android/rust_binder.rs | 196 ++++++++-
> drivers/android/rust_binderfs.c | 866 ++++++++++++++++++++++++++++++++++++++++
> include/linux/rust_binder.h | 16 +
> include/uapi/linux/magic.h | 1 +
> rust/bindings/bindings_helper.h | 2 +
> rust/kernel/lib.rs | 7 +
> scripts/Makefile.build | 2 +-
> 12 files changed, 1547 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig
> index fcfd25c9a016..82ed6ddabe1a 100644
> --- a/drivers/android/Kconfig
> +++ b/drivers/android/Kconfig
> @@ -36,6 +36,18 @@ config ANDROID_BINDERFS
> It can be used to dynamically allocate new binder IPC devices via
> ioctls.
>
> +config ANDROID_BINDERFS_RUST
> + bool "Android Binderfs filesystem in Rust"
> + depends on ANDROID_BINDER_IPC_RUST
> + default n
Nit, the default is always 'n', so no need for this line.
Also, it's the middle of the merge window, many of us are busy with
other things and can't review new code until a few weeks from now,
sorry.
greg k-h
Powered by blists - more mailing lists