lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: hugetlb: Add missing cache flushing in hugetlb_unshare_all_pmds()
On Sun, Apr 24, 2022 at 03:45:02PM +0800, Muchun Song wrote:
> On Sun, Apr 24, 2022 at 02:33:19PM +0800, Baolin Wang wrote:
> > Missed calling flush_cache_range() before removing the sharing PMD entrires,
> > otherwise data consistence issue may be occurred on some architectures whose
> > caches are strict and require a virtual–>physical translation to exist for
> > a virtual address. Thus add it.
> >
> > Fixes: 6dfeaff93be1 ("hugetlb/userfaultfd: unshare all pmds for hugetlbfs when register wp")
> > Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
>
> CONFIG_ARCH_WANT_HUGE_PMD_SHARE is only definded on riscv, arm64 and
> x86. All of them do not have a VIVT cache. In others words,
> flush_cache_range() is null on those architectures. So I suspect
> in practice this does not cause any issue. It is better to
> clarify this in commit log.

Looks correct.

>
> Anyway:
>
> Reviewed-by: Muchun Song <songmuchun@bytedance.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

Thanks,

--
Peter Xu

\
 
 \ /
  Last update: 2022-04-26 19:35    [W:0.065 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site