From: Alexandre Ghiti <alexghiti@rivosinc.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Uladzislau Rezki <urezki@gmail.com>,
Christoph Hellwig <hch@infradead.org>,
Lorenzo Stoakes <lstoakes@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Dylan Jhong <dylan@andestech.com>
Subject: Re: [PATCH -fixes] mm: Add a call to flush_cache_vmap() in vmap_pfn()
Date: Thu, 10 Aug 2023 09:15:06 +0200 [thread overview]
Message-ID: <CAHVXubhcPb3ZF52kM0ZqNi8p-kbXRXPae+0vGioiShyhnZZMSw@mail.gmail.com> (raw)
In-Reply-To: <20230809114651.eb690e5bd4c60b075eb3111b@linux-foundation.org>
Hi Andrew,
On Wed, Aug 9, 2023 at 8:46 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 9 Aug 2023 18:46:33 +0200 Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
>
> > flush_cache_vmap() must be called after new vmalloc mappings are
> > installed in the page table in order to allow architectures to make sure
> > the new mapping is visible.
>
> Thanks. What are the user-visible effects of this bug?
It could lead to a panic since on some architectures (like powerpc),
the page table walker could see the wrong pte value and trigger a
spurious page fault that can not be resolved (see commit f1cb8f9beba8
("powerpc/64s/radix: avoid ptesync after set_pte and
ptep_set_access_flags")).
But actually the patch is aiming at riscv: the riscv specification
allows the caching of invalid entries in the TLB, and since we
recently removed the vmalloc page fault handling, we now need to emit
a tlb shootdown whenever a new vmalloc mapping is emitted
(https://lore.kernel.org/linux-riscv/20230725132246.817726-1-alexghiti@rivosinc.com/).
That's a temporary solution, there are ways to avoid that :)
Thanks,
Alex
next prev parent reply other threads:[~2023-08-10 7:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 16:46 Alexandre Ghiti
2023-08-09 18:46 ` Andrew Morton
2023-08-10 7:15 ` Alexandre Ghiti [this message]
2023-08-09 22:25 ` Christoph Hellwig
2023-08-10 15:13 ` Palmer Dabbelt
2023-08-10 15:58 ` Palmer Dabbelt
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=CAHVXubhcPb3ZF52kM0ZqNi8p-kbXRXPae+0vGioiShyhnZZMSw@mail.gmail.com \
--to=alexghiti@rivosinc.com \
--cc=akpm@linux-foundation.org \
--cc=dylan@andestech.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=urezki@gmail.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