[PATCH 0/4] rust: configfs abstractions

From: Andreas Hindborg
Date: Fri Jan 31 2025 - 08:33:01 EST


This series adds a safe Rust API that allows Rust modules to interface
the `configfs` machinery.

The first patch in the series is a resend of a patch that previously
appeard on list, adapted to apply on top of `rust-6.14`.

The series contains an example for the samples folder to demonstrate
usage of the API. As such, there is no inline example in the
documentation.

The last patch adds a maintainer entry for the Rust configfs
abstractions, to make it absolutely clear that I will commit to maintain
these abstractions, if required. Feel free to drop this patch if this is
not required.

The series is a dependency of `rnull`, the Rust null block driver.
Please see [1] for initial `configfs` support in `rnull`.

[1] https://github.com/metaspace/linux/commit/6a52980852f6a8c234ad06d53e57eeb4c870f472

Signed-off-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
---
Andreas Hindborg (3):
rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T`
rust: configfs: introduce rust support for configfs
MAINTAINERS: add entry for configfs Rust abstractions

Tamir Duberstein (1):
rust: types: add `ForeignOwnable::PointedTo`

MAINTAINERS | 7 +
init/Kconfig | 3 +
rust/bindings/bindings_helper.h | 1 +
rust/kernel/alloc/kbox.rs | 38 +-
rust/kernel/configfs.rs | 811 ++++++++++++++++++++++++++++++++++++++++
rust/kernel/lib.rs | 3 +
rust/kernel/miscdevice.rs | 8 +-
rust/kernel/sync/arc.rs | 30 +-
rust/kernel/types.rs | 46 ++-
samples/rust/Kconfig | 11 +
samples/rust/Makefile | 1 +
samples/rust/rust_configfs.rs | 192 ++++++++++
12 files changed, 1106 insertions(+), 45 deletions(-)
---
base-commit: ceff0757f5dafb5be5205988171809c877b1d3e3
change-id: 20250131-configfs-b888cd82d84a

Best regards,
--
Andreas Hindborg <a.hindborg@xxxxxxxxxx>