lkml.org 
[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] mm: Fix a few rare cases of using swapin error pte marker
From
> 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

\
 
 \ /
  Last update: 2022-12-16 17:06    [W:0.106 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site