[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHVXubhcPb3ZF52kM0ZqNi8p-kbXRXPae+0vGioiShyhnZZMSw@mail.gmail.com>
Date: Thu, 10 Aug 2023 09:15:06 +0200
From: Alexandre Ghiti <alexghiti@...osinc.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Uladzislau Rezki <urezki@...il.com>,
Christoph Hellwig <hch@...radead.org>,
Lorenzo Stoakes <lstoakes@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Dylan Jhong <dylan@...estech.com>
Subject: Re: [PATCH -fixes] mm: Add a call to flush_cache_vmap() in vmap_pfn()
Hi Andrew,
On Wed, Aug 9, 2023 at 8:46 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Wed, 9 Aug 2023 18:46:33 +0200 Alexandre Ghiti <alexghiti@...osinc.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
Powered by blists - more mailing lists