[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240212225312.eq4aebhukeor5g3h@revolver>
Date: Mon, 12 Feb 2024 17:53:12 -0500
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Lokesh Gidra <lokeshgidra@...gle.com>
Cc: akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
selinux@...r.kernel.org, surenb@...gle.com, kernel-team@...roid.com,
aarcange@...hat.com, peterx@...hat.com, david@...hat.com,
axelrasmussen@...gle.com, bgeffon@...gle.com, willy@...radead.org,
jannh@...gle.com, kaleshsingh@...gle.com, ngeoffray@...gle.com,
timmurray@...gle.com, rppt@...nel.org
Subject: Re: [PATCH v4 3/3] userfaultfd: use per-vma locks in userfaultfd
operations
* Lokesh Gidra <lokeshgidra@...gle.com> [240212 17:31]:
> I have also introduced a handler for finding dst_vma and preparing its
> anon_vma, which is used in lock_vma() and find_vmas_mm_locked().
>
> Sounds good?
>
> > I've also thought of how you can name the abstraction in the functions:
> > use a 'prepare() and complete()' to find/lock and unlock what you need.
> > Might be worth exploring? If we fail to 'prepare()' then we don't need
> > to 'complete()', which means there won't be mismatched locking hanging
> > around. Maybe it's too late to change to this sort of thing, but I
> > thought I'd mention it.
> >
> Nice suggestion! But after (fortunately) finding the function names
> that are self-explanatory, dropping them seems like going in the wrong
> direction. Please let me know if you think this is a missing piece. I
> am open to incorporating this.
This plan sounds good, thanks!
Regards,
Liam
Powered by blists - more mailing lists