Skip to contentSkip to conversation

vfs rust file

GIT PULL Merged Christian Brauner 2 participants 2 messages Nov 15, 2024 – Nov 18, 2024 VFS

lore
Share & tools
lore

Christian Brauner

author maintainer
#0 lore raw

Hey Linus,

/* Summary */

This contains the file abstractions needed by the Rust implementation of the Binder driver and other parts of the kernel.

Let's treat this as a first attempt at getting something working but I do expect the actual interfaces to change significantly over time. Simply because we are still figuring out what actually works. But there's no point in further theorizing. Let's see how it holds up with actual users.

/* Testing */

gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)

All patches are based on v6.12-rc2 and have been sitting in linux-next. No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

(1) linux-next: manual merge of the rust tree with the vfs-brauner tree

    https://lore.kernel.org/r/[email protected]

(2) linux-next: manual merge of the rust tree with the vfs-brauner tree

    https://lore.kernel.org/r/[email protected]

(3) linux-next: manual merge of the ftrace tree with the vfs-brauner tree

    https://lore.kernel.org/r/[email protected]

The following changes since commit 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b:

Linux 6.12-rc2 (2024-10-06 15:32:27 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.rust.file

for you to fetch changes up to fe95f58320e6c8dcea3bcb01336b9a7fdd7f684b:

rust: task: adjust safety comments in Task methods (2024-10-15 16:07:02 +0200)

Please consider pulling these changes from the signed vfs-6.13.rust.file tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.13.rust.file

----------------------------------------------------------------
Alice Ryhl (7):
rust: types: add NotThreadSafe
rust: task: add Task::current_raw
rust: security: add abstraction for secctx
rust: file: add Kuid wrapper
rust: file: add abstraction for poll_table
rust: add seqfile abstraction
rust: task: adjust safety comments in Task methods

Christian Brauner (1):
Merge patch series "File abstractions needed by Rust Binder"

Wedson Almeida Filho (3):
rust: file: add Rust abstraction for struct file
rust: cred: add Rust abstraction for struct cred
rust: file: add FileDescriptorReservation

 fs/file.c                       |   7 +
 rust/bindings/bindings_helper.h |   6 +
 rust/helpers/cred.c             |  13 ++
 rust/helpers/fs.c               |  12 ++
 rust/helpers/helpers.c          |   3 +
 rust/helpers/security.c         |  20 ++
 rust/helpers/task.c             |  38 ++++
 rust/kernel/cred.rs             |  85 ++++++++
 rust/kernel/fs.rs               |   8 +
 rust/kernel/fs/file.rs          | 461 ++++++++++++++++++++++++++++++++++++++++
 rust/kernel/lib.rs              |   4 +
 rust/kernel/security.rs         |  74 +++++++
 rust/kernel/seq_file.rs         |  52 +++++
 rust/kernel/sync.rs             |   1 +
 rust/kernel/sync/lock.rs        |  13 +-
 rust/kernel/sync/poll.rs        | 121 +++++++++++
 rust/kernel/task.rs             | 120 +++++++++--
 rust/kernel/types.rs            |  21 ++
 18 files changed, 1035 insertions(+), 24 deletions(-)
 create mode 100644 rust/helpers/cred.c
 create mode 100644 rust/helpers/fs.c
 create mode 100644 rust/helpers/security.c
 create mode 100644 rust/kernel/cred.rs
 create mode 100644 rust/kernel/fs.rs
 create mode 100644 rust/kernel/fs/file.rs
 create mode 100644 rust/kernel/security.rs
 create mode 100644 rust/kernel/seq_file.rs
 create mode 100644 rust/kernel/sync/poll.rs