[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250225160102.3cb44599@eugeo>
Date: Tue, 25 Feb 2025 16:01:02 +0000
From: Gary Guo <gary@...yguo.net>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Matthew Wilcox <willy@...radead.org>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Vlastimil Babka
<vbabka@...e.cz>, John Hubbard <jhubbard@...dia.com>, "Liam R. Howlett"
<Liam.Howlett@...cle.com>, Andrew Morton <akpm@...ux-foundation.org>, Greg
Kroah-Hartman <gregkh@...uxfoundation.org>, Arnd Bergmann <arnd@...db.de>,
Jann Horn <jannh@...gle.com>, Suren Baghdasaryan <surenb@...gle.com>, Alex
Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, "
Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Benno Lossin
<benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, Trevor
Gross <tmgross@...ch.edu>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v14 2/8] mm: rust: add vm_area_struct methods that
require read access
On Thu, 13 Feb 2025 11:04:01 +0000
Alice Ryhl <aliceryhl@...gle.com> wrote:
> This adds a type called VmaRef which is used when referencing a vma that
> you have read access to. Here, read access means that you hold either
> the mmap read lock or the vma read lock (or stronger).
>
> Additionally, a vma_lookup method is added to the mmap read guard, which
> enables you to obtain a &VmaRef in safe Rust code.
>
> This patch only provides a way to lock the mmap read lock, but a
> follow-up patch also provides a way to just lock the vma read lock.
>
> Acked-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> Reviewed-by: Jann Horn <jannh@...gle.com>
> Reviewed-by: Andreas Hindborg <a.hindborg@...nel.org>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
Reviewed-by: Gary Guo <gary@...yguo.net>
> ---
> rust/helpers/mm.c | 6 ++
> rust/kernel/mm.rs | 23 ++++++
> rust/kernel/mm/virt.rs | 210 +++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 239 insertions(+)
Powered by blists - more mailing lists