* [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-09 8:32 ` [tip: locking/core] " tip-bot2 for 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, 1 reply; 6+ 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 [flat|nested] 6+ messages in thread
* [tip: locking/core] MAINTAINERS: Add RUST [SYNC] entry
2026-06-05 5:23 ` [PATCH 1/3] MAINTAINERS: Add RUST [SYNC] entry Boqun Feng
@ 2026-06-09 8:32 ` tip-bot2 for Boqun Feng
0 siblings, 0 replies; 6+ messages in thread
From: tip-bot2 for Boqun Feng @ 2026-06-09 8:32 UTC (permalink / raw)
To: linux-tip-commits
Cc: Boqun Feng, Peter Zijlstra (Intel),
Daniel Almeida, Danilo Krummrich, work, Gary Guo, Alice Ryhl,
x86, linux-kernel
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 4770880855359b345314ca1d0b28f9be8886eba8
Gitweb: https://git.kernel.org/tip/4770880855359b345314ca1d0b28f9be8886eba8
Author: Boqun Feng <boqun@kernel.org>
AuthorDate: Thu, 04 Jun 2026 22:23:29 -07:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 09 Jun 2026 10:28:06 +02:00
MAINTAINERS: Add RUST [SYNC] entry
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.
Signed-off-by: Boqun Feng <boqun@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
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://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]
Link: https://patch.msgid.link/20260415232830.8128-1-boqun@kernel.org
Link: https://patch.msgid.link/20260605052331.1628-2-boqun@kernel.org
---
MAINTAINERS | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 882214b..7c0f853 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>
^ permalink raw reply [flat|nested] 6+ 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; 6+ 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 [flat|nested] 6+ 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
2026-06-09 8:32 ` [tip: locking/core] " tip-bot2 for Fabricio Parra
2 siblings, 1 reply; 6+ 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 [flat|nested] 6+ messages in thread* [tip: locking/core] rust: sync: completion: Mark inline complete_all and wait_for_completion
2026-06-05 5:23 ` [PATCH 3/3] rust: sync: completion: Mark inline complete_all and wait_for_completion Boqun Feng
@ 2026-06-09 8:32 ` tip-bot2 for Fabricio Parra
0 siblings, 0 replies; 6+ messages in thread
From: tip-bot2 for Fabricio Parra @ 2026-06-09 8:32 UTC (permalink / raw)
To: linux-tip-commits
Cc: Alice Ryhl, Fabricio Parra, Boqun Feng, Peter Zijlstra (Intel),
Gary Guo, x86, linux-kernel
The following commit has been merged into the locking/core branch of tip:
Commit-ID: a837dd95e841586c3a6bbe41c41843b392a1b725
Gitweb: https://git.kernel.org/tip/a837dd95e841586c3a6bbe41c41843b392a1b725
Author: Fabricio Parra <a@alice0.com>
AuthorDate: Thu, 04 Jun 2026 22:23:31 -07:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 09 Jun 2026 10:28:06 +02:00
rust: sync: completion: Mark inline complete_all and wait_for_completion
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.
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Fabricio Parra <a@alice0.com>
Signed-off-by: Boqun Feng <boqun@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://github.com/Rust-for-Linux/linux/issues/1145
Link: https://patch.msgid.link/20260316151056.287-1-a@alice0.com
Link: https://patch.msgid.link/20260605052331.1628-4-boqun@kernel.org
---
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 c50012a..35ff049 100644
--- a/rust/kernel/sync/completion.rs
+++ b/rust/kernel/sync/completion.rs
@@ -94,6 +94,7 @@ impl 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 @@ impl Completion {
/// 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()) };
^ permalink raw reply [flat|nested] 6+ messages in thread