linux/rust/kernel/sync
Alice Ryhl bb9749f32a rust: alloc: take the allocator into account for FOREIGN_ALIGN
When converting a Box<T> into a void pointer, the allocator might
guarantee a higher alignment than the type itself does, and in that case
it is guaranteed that the void pointer has that higher alignment.

This is quite useful when combined with the XArray, which you can only
create using a ForeignOwnable whose FOREIGN_ALIGN is at least 4. This
means that you can now always use a Box<T> with the XArray no matter the
alignment of T.

Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250811-align-min-allocator-v2-2-3386cc94f4fc@google.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2025-08-15 20:55:16 +02:00
..
arc rust: provide proper code documentation titles 2024-10-07 21:39:57 +02:00
lock Rust changes for v6.15 2025-03-30 17:03:26 -07:00
arc.rs rust: alloc: take the allocator into account for FOREIGN_ALIGN 2025-08-15 20:55:16 +02:00
aref.rs rust: kernel: move ARef and AlwaysRefCounted to sync::aref 2025-07-22 13:52:14 +02:00
completion.rs rust: completion: implement initial abstraction 2025-06-13 23:46:56 +02:00
condvar.rs rust: sync: Mark CondVar::notify_*() inline 2025-06-24 10:23:48 -07:00
lock.rs rust: sync: Add #[must_use] to Lock::try_lock() 2025-07-11 15:11:54 -07:00
locked_by.rs rust: sync: add missing newline in locked_by log example 2025-03-06 20:44:06 +01:00
poll.rs Scheduler updates for v6.17: 2025-07-29 17:42:52 -07:00
rcu.rs rust: sync: rcu: Mark Guard methods as inline 2025-05-16 09:00:54 -04:00