linux-kernelorg-stable/rust
Baptiste Lepers 5cc5e030bc rust: mm: mark VmaNew as transparent
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>
2025-08-27 22:45:41 -07:00
..
bindings Rust changes for v6.17 2025-08-03 13:49:10 -07:00
helpers Rust changes for v6.17 2025-08-03 13:49:10 -07:00
kernel rust: mm: mark VmaNew as transparent 2025-08-27 22:45:41 -07:00
macros Rust changes for v6.17 2025-08-03 13:49:10 -07:00
pin-init pin-init changes for v6.17 2025-07-13 23:05:14 +02:00
uapi rust: enable `clippy::ref_as_ptr` lint 2025-06-22 23:09:32 +02:00
.gitignore
.kunitconfig rust: add kunitconfig 2025-03-19 23:22:21 +01:00
Makefile rust: kbuild: clean output before running `rustdoc` 2025-08-12 21:10:50 +02:00
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