From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: akpm@linux-foundation.org, mike.kravetz@oracle.com,
peterx@redhat.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: hugetlb: Add missing cache flushing in hugetlb_unshare_all_pmds()
Date: Sun, 24 Apr 2022 18:03:32 +0800 [thread overview]
Message-ID: <4526be44-696b-9719-5a00-6002f61aec01@linux.alibaba.com> (raw)
In-Reply-To: <YmT//huUbFX+KHcy@FVFYT0MHHV2J.usts.net>
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@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.
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@bytedance.com>
Thanks.
next prev parent reply other threads:[~2022-04-24 10:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 6:33 Baolin Wang
2022-04-24 7:45 ` Muchun Song
2022-04-24 10:03 ` Baolin Wang [this message]
2022-04-26 17:34 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4526be44-696b-9719-5a00-6002f61aec01@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=peterx@redhat.com \
--cc=songmuchun@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox