[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3898fb8-3aed-8392-7063-1e58c06d6d5d@redhat.com>
Date: Fri, 16 Dec 2022 17:01:09 +0100
From: David Hildenbrand <david@...hat.com>
To: Peter Xu <peterx@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: Andrea Arcangeli <aarcange@...hat.com>,
Pengfei Xu <pengfei.xu@...el.com>,
Nadav Amit <nadav.amit@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Miaohe Lin <linmiaohe@...wei.com>,
Huang Ying <ying.huang@...el.com>
Subject: Re: [PATCH 2/2] mm: Fix a few rare cases of using swapin error pte
marker
> diff --git a/mm/memory.c b/mm/memory.c
> index 032ef700c3e8..3e836fecd035 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -828,7 +828,7 @@ copy_nonpresent_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
> return -EBUSY;
> return -ENOENT;
> } else if (is_pte_marker_entry(entry)) {
> - if (userfaultfd_wp(dst_vma))
> + if (is_swapin_error_entry(entry) || userfaultfd_wp(dst_vma))
> set_pte_at(dst_mm, addr, dst_pte, pte);
As discussed, it would be great if we could in the future avoid such
allow lists and instead have default allow and only handle problematic
cases. Maybe we can do that in the future with selective clearing of
markers.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists