rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Miscdevices in Rust
@ 2024-10-01  8:22 Alice Ryhl
  2024-10-01  8:22 ` [PATCH v2 1/2] rust: types: add Opaque::try_ffi_init Alice Ryhl
  2024-10-01  8:22 ` [PATCH v2 2/2] rust: miscdevice: add base miscdevice abstraction Alice Ryhl
  0 siblings, 2 replies; 30+ messages in thread
From: Alice Ryhl @ 2024-10-01  8:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arnd Bergmann, Miguel Ojeda, Alexander Viro,
	Christian Brauner, Jan Kara
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Trevor Gross, rust-for-linux, linux-fsdevel,
	linux-kernel, Alice Ryhl

A misc device is generally the best place to start with your first Rust
driver, so having abstractions for miscdevice in Rust will be important
for our ability to teach Rust to kernel developers.

I intend to add a sample driver using these abstractions, and I also
intend to use it in Rust Binder to handle the case where binderfs is
turned off.

To avoid having a dependency on files, this patchset does not provide
the file operations callbacks a pointer to the file. This means that
they cannot check file properties such as O_NONBLOCK (which Binder
needs). Support for that can be added as a follow-up.

To avoid having a dependency on vma, this patchset does not provide any
way to implement mmap (which Binder needs). Support for that can be
added as a follow-up.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Changes in v2:
- Remove dependency on vma and file patchsets.
- Remove mmap, llseek, read_iter functions.
- Drop file position commit.
- Reword commit messages.
- Link to v1: https://lore.kernel.org/r/20240926-b4-miscdevice-v1-0-7349c2b2837a@google.com

---
Alice Ryhl (2):
      rust: types: add Opaque::try_ffi_init
      rust: miscdevice: add base miscdevice abstraction

 rust/bindings/bindings_helper.h |   1 +
 rust/kernel/lib.rs              |   1 +
 rust/kernel/miscdevice.rs       | 241 ++++++++++++++++++++++++++++++++++++++++
 rust/kernel/types.rs            |  16 +++
 4 files changed, 259 insertions(+)
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20240926-b4-miscdevice-29a0fd8438b1

Best regards,
-- 
Alice Ryhl <aliceryhl@google.com>


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2024-10-25  7:58 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01  8:22 [PATCH v2 0/2] Miscdevices in Rust Alice Ryhl
2024-10-01  8:22 ` [PATCH v2 1/2] rust: types: add Opaque::try_ffi_init Alice Ryhl
2024-10-01  8:46   ` Benno Lossin
2024-10-25  4:10   ` Trevor Gross
2024-10-25  7:57     ` Alice Ryhl
2024-10-01  8:22 ` [PATCH v2 2/2] rust: miscdevice: add base miscdevice abstraction Alice Ryhl
2024-10-01  8:53   ` Dirk Behme
2024-10-01  9:13     ` Alice Ryhl
2024-10-01 11:28   ` Alice Ryhl
2024-10-02 12:48   ` Arnd Bergmann
2024-10-02 12:58     ` Alice Ryhl
2024-10-02 13:24       ` Arnd Bergmann
2024-10-02 13:31         ` Alice Ryhl
2024-10-02 13:57           ` Arnd Bergmann
2024-10-02 14:23             ` Alice Ryhl
2024-10-02 15:31               ` Arnd Bergmann
2024-10-02 13:24     ` Christian Brauner
2024-10-02 13:36       ` Alice Ryhl
2024-10-02 14:23         ` Christian Brauner
2024-10-02 15:45           ` Arnd Bergmann
2024-10-02 16:04             ` Greg Kroah-Hartman
2024-10-02 20:08               ` Arnd Bergmann
2024-10-03  8:19               ` Christian Brauner
2024-10-03  8:09             ` Christian Brauner
2024-10-02 13:31   ` Christian Brauner
2024-10-02 14:06   ` Christian Brauner
2024-10-02 14:24     ` Alice Ryhl
2024-10-03  8:33       ` Christian Brauner
2024-10-21 10:34   ` Miguel Ojeda
2024-10-22 13:15     ` Alice Ryhl

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).