rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Miscdevices in Rust
@ 2024-09-26 14:58 Alice Ryhl
  2024-09-26 14:58 ` [PATCH 1/3] rust: types: add Opaque::try_ffi_init Alice Ryhl
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Alice Ryhl @ 2024-09-26 14:58 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.

I know that the patchset is still a bit rough. It could use some work on
the file position aspect. But I'm sending this out now to get feedback
on the overall approach.

This patchset depends on files [1] and vma [2].

Link: https://lore.kernel.org/all/20240915-alice-file-v10-0-88484f7a3dcf@google.com/ [1]
Link: https://lore.kernel.org/all/20240806-vma-v5-1-04018f05de2b@google.com/ [2]
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Alice Ryhl (3):
      rust: types: add Opaque::try_ffi_init
      rust: file: add f_pos and set_f_pos
      rust: miscdevice: add abstraction for defining miscdevices

 rust/bindings/bindings_helper.h |   1 +
 rust/kernel/fs/file.rs          |  20 ++
 rust/kernel/lib.rs              |   1 +
 rust/kernel/miscdevice.rs       | 401 ++++++++++++++++++++++++++++++++++++++++
 rust/kernel/types.rs            |  16 ++
 5 files changed, 439 insertions(+)
---
base-commit: a6266fcab443f4b6ae31016bd6c3872f8200d5e1
change-id: 20240926-b4-miscdevice-29a0fd8438b1

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


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

end of thread, other threads:[~2024-10-01  8:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 14:58 [PATCH 0/3] Miscdevices in Rust Alice Ryhl
2024-09-26 14:58 ` [PATCH 1/3] rust: types: add Opaque::try_ffi_init Alice Ryhl
2024-09-27  9:00   ` Fiona Behrens
2024-09-26 14:58 ` [PATCH 2/3] rust: file: add f_pos and set_f_pos Alice Ryhl
2024-09-26 22:08   ` Al Viro
2024-09-26 22:47     ` Al Viro
2024-09-26 22:52       ` Al Viro
2024-09-27  6:56       ` Alice Ryhl
2024-09-27 19:38         ` Al Viro
2024-10-01  8:20           ` Alice Ryhl
2024-09-27  6:48     ` Alice Ryhl
2024-09-27  7:32   ` Christian Brauner
2024-09-26 14:58 ` [PATCH 3/3] rust: miscdevice: add abstraction for defining miscdevices Alice Ryhl
2024-09-26 15:05 ` [PATCH 0/3] Miscdevices in Rust Greg Kroah-Hartman
2024-09-26 15:11   ` Miguel Ojeda
2024-09-26 15:20   ` Alice Ryhl
2024-09-26 15:36     ` Greg Kroah-Hartman
2024-09-26 18:58 ` Benno Lossin
2024-09-27  6:04   ` Greg Kroah-Hartman

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