linux-stable/rust
Baptiste Lepers 47c430e31b rust: mm: mark VmaNew as transparent
commit 5cc5e030bc upstream.

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.

Link: https://lkml.kernel.org/r/20250812132712.61007-1-baptiste.lepers@gmail.com
Fixes: dcb81aeab4 ("mm: rust: add VmaNew for f_ops->mmap()")
Signed-off-by: Baptiste Lepers <baptiste.lepers@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Cc: Alex Gaynor <alex.gaynor@gmail.com>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Gary Guo <gary@garyguo.net>
Cc: Jann Horn <jannh@google.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Trevor Gross <tmgross@umich.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-09 19:02:29 +02:00
..
bindings rust: completion: implement initial abstraction 2025-06-13 23:46:56 +02:00
helpers Driver core fixes for 6.16-rc3 2025-06-18 14:31:16 -07:00
kernel rust: mm: mark VmaNew as transparent 2025-09-09 19:02:29 +02:00
macros rust: use #[used(compiler)] to fix build and modpost with Rust >= 1.89.0 2025-07-14 23:30:44 +02:00
pin-init pin-init changes for v6.16 2025-05-18 20:42:49 +02:00
uapi drm for 6.16-rc1 2025-05-28 09:46:39 -07:00
.gitignore
.kunitconfig
bindgen_parameters
build_error.rs
compiler_builtins.rs ARM: 9441/1: rust: Enable Rust support for ARMv7 2025-03-26 13:31:16 +00:00
exports.c
ffi.rs rust: use absolute paths in macros referencing core and kernel 2025-05-23 00:12:14 +02:00
Makefile rust: workaround rustdoc target modifiers bug 2025-08-20 18:41:35 +02:00