From: Alice Ryhl <aliceryhl@google.com>
To: Carlos Llamas <cmllamas@google.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Martijn Coenen" <maco@android.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Christian Brauner" <brauner@kernel.org>,
"Suren Baghdasaryan" <surenb@google.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Lorenzo Stoakes" <lorenzo.stoakes@oracle.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
"Paul Moore" <paul@paul-moore.com>,
"Serge Hallyn" <sergeh@kernel.org>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Matt Gilbride" <mattgilbride@google.com>
Subject: Re: [PATCH] rust_binder: add Rust Binder driver
Date: Thu, 18 Sep 2025 16:55:11 +0000 [thread overview]
Message-ID: <aMw5b7aNxoULilmg@google.com> (raw)
In-Reply-To: <aMwxLQubVOuGZGLf@google.com>
On Thu, Sep 18, 2025 at 04:19:57PM +0000, Carlos Llamas wrote:
> On Thu, Sep 18, 2025 at 10:19:38AM +0000, Alice Ryhl wrote:
> > Please see the attached link to the original RFC for motivation.
> >
> > I did not include all of the tracepoints as I felt that the mechansim
> > for making C access fields of Rust structs should be discussed on list
> > separately. I also did not include the support for building Rust Binder
> > as a module since that requires exporting a bunch of additional symbols
> > on the C side.
> >
> > Link: https://lore.kernel.org/r/20231101-rust-binder-v1-0-08ba9197f637@google.com
> > Co-developed-by: Wedson Almeida Filho <wedsonaf@gmail.com>
> > Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
> > Co-developed-by: Matt Gilbride <mattgilbride@google.com>
> > Signed-off-by: Matt Gilbride <mattgilbride@google.com>
> > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> > --- /dev/null
> > +++ b/drivers/android/binder/Makefile
> > @@ -0,0 +1,9 @@
> > +# SPDX-License-Identifier: GPL-2.0-only
> > +ccflags-y += -I$(src) # needed for trace events
> > +
> > +obj-$(CONFIG_ANDROID_BINDER_IPC_RUST) += rust_binder.o
> > +rust_binder-$(CONFIG_ANDROID_BINDER_IPC_RUST) := \
>
> Since there is only one option for rust_binder.o, the target here should
> probably be just 'rust_binder-y := ...'.
Ok. I don't mind.
> > diff --git a/drivers/android/binder/dummy.c b/drivers/android/binder/dummy.c
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..7e9f6ea3a474b59f11e723a709c0c21e8b8beae0
> > --- /dev/null
> > +++ b/drivers/android/binder/dummy.c
>
> This dummy should be removed, we aren't going to need it here right?
Ah yeah, thanks. This file can be deleted.
> > +// SPDX-License-Identifier: GPL-2.0
>
> I'm not sure if all these need to be "GPL-2.0-only" explicitly?
It should be the same.
> > +int init_rust_binderfs(void)
> > +{
> > + int ret;
> > + const char *name;
> > + size_t len;
> > +
> > + /* Verify that the default binderfs device names are valid. */
> > + name = rust_binder_devices_param;
> > + for (len = strcspn(name, ","); len > 0; len = strcspn(name, ",")) {
> > + if (len > BINDERFS_MAX_NAME)
> > + return -E2BIG;
> > + name += len;
> > + if (*name == ',')
> > + name++;
> > + }
> > +
> > + /* Allocate new major number for binderfs. */
> > + ret = alloc_chrdev_region(&binderfs_dev, 0, BINDERFS_MAX_MINOR,
> > + "rust_binder");
> > + if (ret)
> > + return ret;
> > +
> > + ret = register_filesystem(&binder_fs_type);
> > + if (ret) {
> > + unregister_chrdev_region(binderfs_dev, BINDERFS_MAX_MINOR);
> > + return ret;
> > + }
> > +
> > + return ret;
> > +}
>
> Hmm, is there anyway to keep a single binderfs.c implementation? In this
> case we now have separate CONFIGs we could use for the file creation
> callback? It would be nice to keep a single binderfs source file.
It could be nice, but it's pretty non-trivial to unify them. If we do
that, it will have to be a follow-up, and the follow-up will modify C
Binder too.
Alice
next prev parent reply other threads:[~2025-09-18 16:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 10:19 [PATCH] rust_binder: add Rust Binder driver Alice Ryhl
2025-09-18 15:51 ` Paul Moore
2025-09-18 16:56 ` Alice Ryhl
2025-09-18 16:19 ` Carlos Llamas
2025-09-18 16:55 ` Alice Ryhl [this message]
2025-09-18 17:03 ` Carlos Llamas
2025-09-18 17:03 ` Greg Kroah-Hartman
2025-09-18 17:42 ` Danilo Krummrich
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=aMw5b7aNxoULilmg@google.com \
--to=aliceryhl@google.com \
--cc=Liam.Howlett@oracle.com \
--cc=a.hindborg@kernel.org \
--cc=arve@android.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=lossin@kernel.org \
--cc=maco@android.com \
--cc=mattgilbride@google.com \
--cc=ojeda@kernel.org \
--cc=paul@paul-moore.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=sergeh@kernel.org \
--cc=surenb@google.com \
--cc=tkjos@android.com \
--cc=tmgross@umich.edu \
--cc=wedsonaf@gmail.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).