[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 2 Mar 2023 17:57:34 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Peter Xu <peterx@...hat.com>,
Jerome Glisse <jglisse@...hat.com>, Shaohua Li <shli@...com>
Subject: Re: [PATCH v1] mm/userfaultfd: propagate uffd-wp bit when
PTE-mapping the huge zeropage
On Thu, 2 Mar 2023 18:54:23 +0100 David Hildenbrand <david@...hat.com> wrote:
> Currently, we'd lose the userfaultfd-wp marker when PTE-mapping a huge
> zeropage, resulting in the next write faults in the PMD range
> not triggering uffd-wp events.
>
> Various actions (partial MADV_DONTNEED, partial mremap, partial munmap,
> partial mprotect) could trigger this. However, most importantly,
> un-protecting a single sub-page from the userfaultfd-wp handler when
> processing a uffd-wp event will PTE-map the shared huge zeropage and
> lose the uffd-wp bit for the remainder of the PMD.
>
> Let's properly propagate the uffd-wp bit to the PMDs.
>
> ...
>
> Fixes: e06f1e1dd499 ("userfaultfd: wp: enabled write protection in userfaultfd API")
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Mike Rapoport <rppt@...ux.vnet.ibm.com>
> Cc: Andrea Arcangeli <aarcange@...hat.com>
> Cc: Peter Xu <peterx@...hat.com>
> Cc: Jerome Glisse <jglisse@...hat.com>
> Cc: Shaohua Li <shli@...com>
> Signed-off-by: David Hildenbrand <david@...hat.com>
Do you agree that a -stable backport is appropriate?
Powered by blists - more mailing lists