Skip to contentSkip to conversation

rust-mm-mark-vmanew-as-transparent.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Aug 28, 2025 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: rust: mm: mark VmaNew as transparent
has been removed from the -mm tree. Its filename was
rust-mm-mark-vmanew-as-transparent.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Baptiste Lepers <[email protected]>
Subject: rust: mm: mark VmaNew as transparent
Date: Tue, 12 Aug 2025 15:26:56 +0200

Unsafe code in VmaNew's methods assumes that the type has the same layout as the inner bindings::vm_area_struct. This is not guaranteed by the default struct representation in Rust, but requires specifying the transparent representation.

Fixes dcb81aeab406 ("mm: rust: add VmaNew for f_ops->mmap()")
Cc Alex Gaynor <[email protected]>
Cc Andreas Hindborg <[email protected]>
Cc Björn Roy Baron <[email protected]>
Cc Boqun Feng <[email protected]>
Cc Danilo Krummrich <[email protected]>
Cc Gary Guo <[email protected]>
Cc Jann Horn <[email protected]>
Cc Liam Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Miguel Ojeda <[email protected]>
Cc Trevor Gross <[email protected]>

---

 rust/kernel/mm/virt.rs |    1 +
 1 file changed, 1 insertion(+)
rust/kernel/mm/virt.rs renamed from rust/kernel/mm/virt.rs~rust-mm-mark-vmanew-as-transparent +1 -0
@@ -209,6 +209,7 @@ impl VmaMixedMap {
 ///
 /// For the duration of 'a, the referenced vma must be undergoing initialization in an
 /// `f_ops->mmap()` hook.
+#[repr(transparent)]
 pub struct VmaNew {
     vma: VmaRef,
 }

_

Patches currently in -mm which might be from [email protected] are