[PATCH 0/8] rust: DebugFS Bindings

Matthew Maurer
2025-04-29T23:15:57Z

This series provides safe DebugFS bindings for Rust, with a sample
driver using them.

The primary intended way to use these bindings is to attach a data
object to a DebugFS directory handle, and use the contents of that
attached object to serve what's inside the directory. Through a
combination of pinning and equivariance, we can ensure that the pointers
in the attached object will remain valid until after the DebugFS
directory is made inaccessible.

Signed-off-by: Matthew Maurer <mmaurer@google.com>
---
Matthew Maurer (8):
rust: debugfs: Bind DebugFS directory creation
rust: debugfs: Bind file creation for long-lived Display
rust: debugfs: Add scoped builder interface
rust: debugfs: Allow subdir creation in builder interface
rust: debugfs: Support format hooks
rust: debugfs: Implement display_file in terms of fmt_file
rust: debugfs: Helper macro for common case implementations
rust: samples: Add debugfs sample

MAINTAINERS | 2 +
rust/bindings/bindings_helper.h | 1 +
rust/helpers/dcache.c | 12 +
rust/helpers/helpers.c | 1 +
rust/kernel/debugfs.rs | 514 ++++++++++++++++++++++++++++++++++++++++
rust/kernel/lib.rs | 1 +
samples/rust/Kconfig | 11 +
samples/rust/Makefile | 1 +
samples/rust/rust_debugfs.rs | 120 ++++++++++
9 files changed, 663 insertions(+)
---
base-commit: b6a7783d306baf3150ac54cd5124f6e85dd375b0
change-id: 20250428-debugfs-rust-3cd5c97eb7d1

Best regards,
--
Matthew Maurer <mmaurer@google.com>