rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] [PATCH 0/4] Rust locking changes for v6.18
@ 2025-09-19  9:12 Boqun Feng
  2025-09-19  9:12 ` [PATCH 1/4] locking/spinlock/debug: Fix data-race in do_raw_write_lock Boqun Feng
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Boqun Feng @ 2025-09-19  9:12 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner
  Cc: rust-for-linux, linux-kernel, lkmm, Will Deacon, Peter Zijlstra,
	Waiman Long, Miguel Ojeda, alex.gaynor, Gary Guo,
	Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Andreas Hindborg, Boqun Feng

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(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-10-15 15:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19  9:12 [GIT PULL] [PATCH 0/4] Rust locking changes for v6.18 Boqun Feng
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

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).