lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4526be44-696b-9719-5a00-6002f61aec01@linux.alibaba.com>
Date:   Sun, 24 Apr 2022 18:03:32 +0800
From:   Baolin Wang <baolin.wang@...ux.alibaba.com>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     akpm@...ux-foundation.org, mike.kravetz@...cle.com,
        peterx@...hat.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: hugetlb: Add missing cache flushing in
 hugetlb_unshare_all_pmds()



On 4/24/2022 3:45 PM, 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@...ux.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.

Yes, just from code inspection and to keep same behaviors when unmapping 
sharing PMD entrires in case more architectures can support 
CONFIG_ARCH_WANT_HUGE_PMD_SHARE in future. Will update the commit 
message in next version.

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

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ