lkml.org 
[lkml]   [2023]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 2/4] userfaultfd: split mwriteprotect_range()
From
On 1/27/23 10:05 PM, Peter Xu wrote:
> On Tue, Jan 24, 2023 at 01:43:21PM +0500, Muhammad Usama Anjum wrote:
>> Split mwriteprotect_range() to create a unlocked version. This
>> will be used in the next patch to write protect a memory area.
>> Add a helper function, wp_range_async() as well.
>>
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>
> IIUC this patch is not needed. You have a stable vma, so I think you can
> directly use uffd_wp_range(), while most of the mwriteprotect_range() is
> not needed.
>
> There's one trivial detail of ignoring userfaultfd_ctx->mmap_changing when
> it's set to true, but I don't think it applies here either because it was
> used to resolve a problem in uffd non-cooperative mode on the predictable
> behavior of events, here I don't think it matters a lot either.
>
Thanks, I'll drop this patch and do direct wiring to uffd_wp_range().

--
BR,
Muhammad Usama Anjum

\
 
 \ /
  Last update: 2023-03-27 00:01    [W:0.072 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site