From: Boqun Feng <boqun.feng@gmail.com>
To: "Peter Zijlstra" <peterz@nfradead.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
lkmm@lists.linux.dev, "Will Deacon" <will@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Waiman Long" <longman@redhat.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
alex.gaynor@gmail.com, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>
Subject: [GIT PULL] [PATCH 0/4] Rust locking changes for v6.18
Date: Fri, 19 Sep 2025 11:12:37 +0200 [thread overview]
Message-ID: <20250919091241.32138-1-boqun.feng@gmail.com> (raw)
Hi Peter & Ingo,
Please pull this (mostly) Rust locking changes to tip. It's a bit late
than usual because I was at Kangrejos conference this week, however the
changes are relatively small and simple, so I think it's Ok for v6.18.
I also try using "git notes" for submission links as Thomas suggests,
let see how it goes ;-)
The following changes since commit 17d9f8eaa87d40a2ff66598875a43363e37a909b:
MAINTAINERS: update atomic infrastructure entry to include Rust (2025-09-15 09:38:36 +0200)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git/ tags/rust-locking.2025.09.19a
for you to fetch changes up to 9622209360c25d78a81048a9db72f1efef7fbc58:
rust: lock: Add a Pin<&mut T> accessor (2025-09-15 22:28:35 -0400)
Regards,
Boqun
----------------------------------------------------------------
Locking changes for v6.18:
- Fix a data-race in do_raw_write_lock reported by KCSAN
Rust locking changes for v6.18
- Make `data` in `Lock` structurally pinned.
Previously the `data` field of a `Lock<T>` is not structurally pinned,
and it's impossible to initialize the `data` field with a
pin-initializer, hence e.g. a `Lock<T>` where T is a pin-initialized
type is not supported. This encourages workarounds like
`Lock<Pin<KBox<T>>`, which is more complicated and less efficient.
Therefore make the `data` field in `Lock` structurally pinned to
support pin-initialized types in a `Lock<T>`.
Since the `data` field is structurally pinned, make `Guard<T, ...>`
only `DerefMut` is T is Unpin, otherwise `Guard::as_mut()` is added to
provide a `Pin<&mut T>`. This is different than normal Rust standand
library locks.
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEj5IosQTPz8XU1wRHSXnow7UH+rgFAmjNGoEACgkQSXnow7UH
+riU8ggAnRUTBam8NTmHJpZfVbbNSfx1ndaARxd9Wb/MLEh8OHYKbVRPJwvWGge+
dafO0VYULku7ho1SeIlLXp4Bbjy3YC6o/J6xOpr9xMmysUky7RHi+Ys0y9gKaSmW
daPurQEOS8TBUWu5yVxNAfWoRgPEiPULovbzgANKKAV7QsljyoEg7mQCPxLftPze
Hr22HxU+lr6SDH5Efc8ihGqXJAvwunk+0mkJymZbjWo3ZF3cuhXlTMcIlu1SK14a
R1VQu5UoX8S5y0T0gkJ84UJ11e0wrSZyT0EqmHWSpVBnyGgWk8H1u284hDiGG2iG
FvwoSQ9iVuxLhxjhPUSOjq30DzmFfg==
=MZj4
-----END PGP SIGNATURE-----
----------------------------------------------------------------
Alexander Sverdlin (1):
locking/spinlock/debug: Fix data-race in do_raw_write_lock
Daniel Almeida (3):
rust: lock: guard: Add T: Unpin bound to DerefMut
rust: lock: Pin the inner data
rust: lock: Add a Pin<&mut T> accessor
kernel/locking/spinlock_debug.c | 4 ++--
rust/kernel/sync/lock.rs | 41 +++++++++++++++++++++++++++++++++++++----
rust/kernel/sync/lock/global.rs | 5 ++++-
3 files changed, 43 insertions(+), 7 deletions(-)
next reply other threads:[~2025-09-19 9:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 9:12 Boqun Feng [this message]
2025-09-19 9:12 ` [PATCH 1/4] locking/spinlock/debug: Fix data-race in do_raw_write_lock Boqun Feng
2025-09-19 9:12 ` [PATCH 2/4] rust: lock: guard: Add T: Unpin bound to DerefMut Boqun Feng
2025-09-19 9:12 ` [PATCH 3/4] rust: lock: Pin the inner data Boqun Feng
2025-09-19 9:12 ` [PATCH 4/4] rust: lock: Add a Pin<&mut T> accessor Boqun Feng
2025-09-19 9:27 ` [GIT PULL] [PATCH 0/4] Rust locking changes for v6.18 Boqun Feng
2025-10-15 15:16 ` Boqun Feng
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=20250919091241.32138-1-boqun.feng@gmail.com \
--to=boqun.feng@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lkmm@lists.linux.dev \
--cc=longman@redhat.com \
--cc=lossin@kernel.org \
--cc=mingo@kernel.org \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=peterz@nfradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tmgross@umich.edu \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).