Re: [PATCH] mm/hugetlb: Fix uffd wr-protection for CoW optimization path

From: Peter Xu
Date: Tue Mar 21 2023 - 17:42:52 EST


On Tue, Mar 21, 2023 at 01:57:19PM -0700, Mike Kravetz wrote:
> > This patch fixes an issue that a hugetlb uffd-wr-protected mapping can be
> > writable even with uffd-wp bit set. It only happens with all these
> > conditions met: (1) hugetlb memory (2) private mapping (3) original mapping
> > was missing, then (4) being wr-protected (IOW, pte marker installed). Then
> ^^^^
> Nit, but is the word "then" intended to be there? Almost makes it sound as
> if wr-protected was a result of the previous 3 conditions being met.

Not intended.. Since this is not fixup-able, I'll reword here when I'll
need to repost.

[...]

> Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>

Thanks!

--
Peter Xu