[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <db84157d-94bc-4334-9d2d-a7e43cbc0208@redhat.com>
Date: Mon, 30 Sep 2024 22:35:58 +0200
From: David Hildenbrand <david@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org,
syzbot+bf2c35fa302ebe3c7471@...kaller.appspotmail.com,
Peter Xu <peterx@...hat.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH v1] mm/huge_memory: check pmd_special() only after
pmd_present()
On 26.09.24 17:42, David Hildenbrand wrote:
> We should only check for pmd_special() after we made sure that we
> have a present PMD. For example, if we have a migration PMD,
> pmd_special() might indicate that we have a special PMD although we
> really don't.
>
> This fixes confusing migration entries as PFN mappings, and not
> doing what we are supposed to do in the "is_swap_pmd()" case further
> down in the function -- including messing up COW, page table handling
> and accounting.
>
> Reported-by: syzbot+bf2c35fa302ebe3c7471@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/lkml/66f15c8d.050a0220.c23dd.000f.GAE@google.com/
> Fixes: bc02afbd4d73 ("mm/fork: accept huge pfnmap entries")
> Cc: Peter Xu <peterx@...hat.com>
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
>
> I yet have to do more testing, but sending this out already.
Testing looks good. Andrew please queue this, it's a rather unpleasent
behavior if we fork() with a PMD migration entry that should be fixed
upstream soonish :)
(no idea how I could have missed CCing Andrew once more)
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists