The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Benno Lossin <lossin@kernel.org>
To: "Benno Lossin" <benno.lossin@proton.me>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Fiona Behrens" <me@kloenk.dev>,
	"Christian Schrefl" <chrisi.schrefl@gmail.com>,
	"Alban Kurti" <kurti@invicto.ai>,
	"Michael Vetter" <jubalh@iodoru.org>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	Benno Lossin <lossin@kernel.org>
Subject: [GIT PULL] Rust pin-init for v6.16
Date: Wed,  7 May 2025 12:54:55 +0200	[thread overview]
Message-ID: <20250507105455.72863-1-lossin@kernel.org> (raw)

Hi Miguel,

Here is the first pin-init pull request! It contains more changes than I
expected the first PR to have, but the new CI discovered a few smaller
issues and I also got a contribution.

All commits have been in linux-next for a few days. The earlier commits
have been in linux-next for a few weeks.

No conflicts expected.

Please pull for v6.16 -- thanks!

---
Cheers,
Benno

The following changes since commit 9c32cda43eb78f78c73aee4aa344b777714e259b:

  Linux 6.15-rc3 (2025-04-20 13:43:47 -0700)

are available in the Git repository at:

  https://github.com/Rust-for-Linux/linux.git tags/pin-init-v6.16

for you to fetch changes up to 9de1a293c8ece00d226b21a35751ec178be2a9fa:

  rust: pin-init: improve documentation for `Zeroable` derive macros (2025-05-01 18:16:22 +0200)

----------------------------------------------------------------
pin-init changes for v6.16

Added:

- 'Wrapper<T>' trait for creating pin-initializers for wrapper structs
  with a structurally pinned value such as 'UnsafeCell<T>' or
  'MaybeUninit<T>'.

- 'MaybeZeroable' derive macro to try to derive 'Zeroable', but not
  error if not all fields implement it. This is needed to derive
  'Zeroable' for all bindgen-generated structs.

- 'unsafe fn cast_[pin_]init()' functions to unsafely change the
  initialized type of an initializer. These are utilized by the
  'Wrapper<T>' implementations.

Changed:

- Added support for visibility in 'Zeroable' derive macro.

- Added support for 'union's in 'Zeroable' derive macro.

Upstream dev news:

- The CI has been streamlined & some bugs with it have been fixed. I
  also added new workflows to check if the user-space version and the
  one in the kernel tree have diverged.

- I also started to use the issues [1] tab to keep track of any problems
  or unexpected/unwanted things. This should help folks report and
  diagnose issues w.r.t. 'pin-init' better.

[1]: https://github.com/rust-for-linux/pin-init/issues

----------------------------------------------------------------
Benno Lossin (10):
      rust: pin-init: synchronize README.md
      rust: pin-init: internal: skip rustfmt formatting of kernel-only module
      rust: pin-init: examples: conditionally enable `feature(lint_reasons)`
      rust: pin-init: examples: use `allow` instead of `expect`
      rust: pin-init: add `cast_[pin_]init` functions to change the initialized type
      rust: pin-init: allow `pub` fields in `derive(Zeroable)`
      rust: pin-init: allow `Zeroable` derive macro to also be applied to unions
      rust: pin-init: add `MaybeZeroable` derive macro
      rust: pin-init: fix typos
      rust: pin-init: improve documentation for `Zeroable` derive macros

Christian Schrefl (4):
      rust: pin-init: Add the `Wrapper` trait.
      rust: pin-init: Implement `Wrapper` for `UnsafePinned` behind feature flag.
      rust: pin-init: Update Changelog and Readme
      rust: pin-init: Update the structural pinning link in readme.

 rust/pin-init/README.md                 |  14 +++-
 rust/pin-init/examples/linked_list.rs   |   1 +
 rust/pin-init/examples/mutex.rs         |   1 +
 rust/pin-init/examples/pthread_mutex.rs |   4 +-
 rust/pin-init/examples/static_init.rs   |   1 +
 rust/pin-init/internal/src/lib.rs       |   6 ++
 rust/pin-init/internal/src/zeroable.rs  |  27 +++++-
 rust/pin-init/src/lib.rs                | 144 +++++++++++++++++++++++++++++++-
 rust/pin-init/src/macros.rs             |  91 +++++++++++++++++++-
 9 files changed, 279 insertions(+), 10 deletions(-)

             reply	other threads:[~2025-05-07 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 10:54 Benno Lossin [this message]
2025-05-18 20:49 ` [GIT PULL] Rust pin-init for v6.16 Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250507105455.72863-1-lossin@kernel.org \
    --to=lossin@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=chrisi.schrefl@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=jubalh@iodoru.org \
    --cc=kurti@invicto.ai \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@kloenk.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox