Re: [PATCH v12 0/4] fix double page fault in cow_user_page for pfn mapping
From: Catalin Marinas
Date: Wed Oct 16 2019 - 10:32:59 EST
On Tue, Oct 15, 2019 at 01:18:34AM +0100, Will Deacon wrote:
> On Fri, Oct 11, 2019 at 10:09:35PM +0800, Jia He wrote:
> > When we tested pmdk unit test vmmalloc_fork TEST1 in arm64 guest, there
> > will be a double page fault in __copy_from_user_inatomic of cow_user_page.
> >
> > As told by Catalin: "On arm64 without hardware Access Flag, copying from
> > user will fail because the pte is old and cannot be marked young. So we
> > always end up with zeroed page after fork() + CoW for pfn mappings. we
> > don't always have a hardware-managed access flag on arm64."
> >
> > -Changes
> > v12:
> > refine PATCH 01, remove the !! since C languages can convert unsigned
> > to bool (Catalin)
>
> Thanks. I think it's a bit late to take something like this for 5.4 now,
> especially as the current behaviour has always been there. Hopefully
> somebody can queue it for 5.5 instead.
I can queue this through the arm64 tree for 5.5 if I get an ack on the
x86 patch (3/4) or I don't hear any complaints.
--
Catalin