* [PATCH 1/3] MAINTAINERS: Add RUST [SYNC] entry
2026-06-05 5:23 [GIT PULL] [PATCH 0/3] Rust synchronization changes for v7.2 Boqun Feng
@ 2026-06-05 5:23 ` Boqun Feng
2026-06-05 5:23 ` [PATCH 2/3] locking/lockdep: Replace snprintf with strscpy in seq_stats Boqun Feng
2026-06-05 5:23 ` [PATCH 3/3] rust: sync: completion: Mark inline complete_all and wait_for_completion Boqun Feng
2 siblings, 0 replies; 4+ messages in thread
From: Boqun Feng @ 2026-06-05 5:23 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Will Deacon, Boqun Feng, Waiman Long, Gary Guo,
Alice Ryhl, Lyude Paul, Daniel Almeida, Onur Özkan,
Miguel Ojeda, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Trevor Gross, Danilo Krummrich, linux-kernel,
rust-for-linux
We have two pull requests on Rust synchronization primitives with 10+
patches in a row for recent cycles, so it makes sense to start the
effort of handling this area as a group.
Luckily for me, Gary Guo and Alice Ryhl agreed to help as
co-maintainers, and we also have a talented group of reviewers:
Lyude Paul started the SpinLockIrq work [1] and did an amazing job at
improving the design and implementation.
Daniel Almeida resolved the Lock<T: !Unpin> issue [2] and he did a fair
amount of reviews in areas related to synchronization primitives
already.
Onur Özkan started the ww_mutex work [3] and did an amazing job at
consolidating various design requirements and decisions.
Of course, this only reflects my own knowledge, and I believe they did
way more outside what I'm aware of ;-)
Note that having this MAINTAINERS entry is meant to bring more people
to help on the synchronization primitives in Rust, which means for patch
submissions and design discussion, please still involve the
corresponding maintainers (e.g. LOCKING and ATOMIC),
scripts/get_maintainers.pl should have this covered.
Link: https://lore.kernel.org/rust-for-linux/20260302232154.861916-1-lyude@redhat.com/ [1]
Link: https://lore.kernel.org/all/20250828-lock-t-when-t-is-pinned-v2-0-b067c4b93fd6@collabora.com/ [2]
Link: https://lore.kernel.org/rust-for-linux/20260103073554.34855-1-work@onurozkan.dev/ [3]
Acked-by: Daniel Almeida <daniel.almeida@collabora.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Onur Özkan <work@onurozkan.dev>
Acked-by: Gary Guo <gary@garyguo.net>
Acked-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260415232830.8128-1-boqun@kernel.org
Signed-off-by: Boqun Feng <boqun@kernel.org>
---
MAINTAINERS | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 882214b0e7db..7c0f853b881b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23450,6 +23450,20 @@ S: Maintained
T: git https://github.com/Rust-for-Linux/linux.git rust-analyzer-next
F: scripts/generate_rust_analyzer.py
+RUST [SYNC]
+M: Boqun Feng <boqun@kernel.org>
+M: Gary Guo <gary@garyguo.net>
+M: Alice Ryhl <aliceryhl@google.com>
+R: Lyude Paul <lyude@redhat.com>
+R: Daniel Almeida <daniel.almeida@collabora.com>
+R: "Onur Özkan" <work@onurozkan.dev>
+L: linux-kernel@vger.kernel.org
+L: rust-for-linux@vger.kernel.org
+S: Maintained
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-sync
+F: rust/kernel/sync.rs
+F: rust/kernel/sync/
+
RXRPC SOCKETS (AF_RXRPC)
M: David Howells <dhowells@redhat.com>
M: Marc Dionne <marc.dionne@auristor.com>
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] locking/lockdep: Replace snprintf with strscpy in seq_stats
2026-06-05 5:23 [GIT PULL] [PATCH 0/3] Rust synchronization changes for v7.2 Boqun Feng
2026-06-05 5:23 ` [PATCH 1/3] MAINTAINERS: Add RUST [SYNC] entry Boqun Feng
@ 2026-06-05 5:23 ` Boqun Feng
2026-06-05 5:23 ` [PATCH 3/3] rust: sync: completion: Mark inline complete_all and wait_for_completion Boqun Feng
2 siblings, 0 replies; 4+ messages in thread
From: Boqun Feng @ 2026-06-05 5:23 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Will Deacon, Boqun Feng, Waiman Long, Gary Guo,
Alice Ryhl, Lyude Paul, Daniel Almeida, Onur Özkan,
Miguel Ojeda, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Trevor Gross, Danilo Krummrich, linux-kernel,
rust-for-linux, Thorsten Blum
From: Thorsten Blum <thorsten.blum@linux.dev>
Replace snprintf("%s", ...) with the faster and more direct strscpy().
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Boqun Feng <boqun@kernel.org>
Link: https://patch.msgid.link/20260318001426.2664-3-thorsten.blum@linux.dev
---
kernel/locking/lockdep_proc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c
index 1916db9aa46b..e458fa258d05 100644
--- a/kernel/locking/lockdep_proc.c
+++ b/kernel/locking/lockdep_proc.c
@@ -19,6 +19,7 @@
#include <linux/debug_locks.h>
#include <linux/vmalloc.h>
#include <linux/sort.h>
+#include <linux/string.h>
#include <linux/uaccess.h>
#include <asm/div64.h>
@@ -488,9 +489,9 @@ static void seq_stats(struct seq_file *m, struct lock_stat_data *data)
const char *key_name;
key_name = __get_key_name(ckey, str);
- snprintf(name, namelen, "%s", key_name);
+ strscpy(name, key_name, namelen);
} else {
- snprintf(name, namelen, "%s", cname);
+ strscpy(name, cname, namelen);
}
rcu_read_unlock_sched();
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] rust: sync: completion: Mark inline complete_all and wait_for_completion
2026-06-05 5:23 [GIT PULL] [PATCH 0/3] Rust synchronization changes for v7.2 Boqun Feng
2026-06-05 5:23 ` [PATCH 1/3] MAINTAINERS: Add RUST [SYNC] entry Boqun Feng
2026-06-05 5:23 ` [PATCH 2/3] locking/lockdep: Replace snprintf with strscpy in seq_stats Boqun Feng
@ 2026-06-05 5:23 ` Boqun Feng
2 siblings, 0 replies; 4+ messages in thread
From: Boqun Feng @ 2026-06-05 5:23 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Will Deacon, Boqun Feng, Waiman Long, Gary Guo,
Alice Ryhl, Lyude Paul, Daniel Almeida, Onur Özkan,
Miguel Ojeda, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Trevor Gross, Danilo Krummrich, linux-kernel,
rust-for-linux, Fabricio Parra
From: Fabricio Parra <a@alice0.com>
When building the kernel using the llvm-22.1.0-rust-1.93.1-x86_64
toolchain provided by kernel.org with ARCH=x86_64, the following symbols
are generated:
$ nm vmlinux | grep ' _R'.*Completion | rustfilt
ffffffff81827930 T <kernel::sync::completion::Completion>::complete_all
ffffffff81827950 T <kernel::sync::completion::Completion>::wait_for_completion
These Rust methods are thin wrappers around the C completion helpers
`complete_all` and `wait_for_completion`. Mark them `#[inline]` to keep
the wrapper pattern consistent with other small Rust helper methods.
After applying this patch, the above command will produce no output.
Link: https://github.com/Rust-for-Linux/linux/issues/1145
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Fabricio Parra <a@alice0.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Boqun Feng <boqun@kernel.org>
Link: https://patch.msgid.link/20260316151056.287-1-a@alice0.com
---
rust/kernel/sync/completion.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rust/kernel/sync/completion.rs b/rust/kernel/sync/completion.rs
index c50012a940a3..35ff049ff078 100644
--- a/rust/kernel/sync/completion.rs
+++ b/rust/kernel/sync/completion.rs
@@ -94,6 +94,7 @@ fn as_raw(&self) -> *mut bindings::completion {
///
/// This method wakes up all tasks waiting on this completion; after this operation the
/// completion is permanently done, i.e. signals all current and future waiters.
+ #[inline]
pub fn complete_all(&self) {
// SAFETY: `self.as_raw()` is a pointer to a valid `struct completion`.
unsafe { bindings::complete_all(self.as_raw()) };
@@ -105,6 +106,7 @@ pub fn complete_all(&self) {
/// timeout.
///
/// See also [`Completion::complete_all`].
+ #[inline]
pub fn wait_for_completion(&self) {
// SAFETY: `self.as_raw()` is a pointer to a valid `struct completion`.
unsafe { bindings::wait_for_completion(self.as_raw()) };
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread