Cortex A15: Errata 798181: Moving a virtual page that is being accessed by an active process can lead to unexpected behavior

Catalin Marinas catalin.marinas at arm.com
Wed Feb 22 04:07:59 PST 2023


On Wed, Feb 22, 2023 at 10:07:23AM +0100, Matija Glavinic Pecotic wrote:
> I have noticed that we are using local_flush_tlb_kernel_range
> in couple of places while errata from subject is applied in
> flush_tlb_kernel_range. We have local_flush_tlb_kernel in:
> 
>   section_update
>   __set_fixmap
>   set_top_pte
>   #define arch_kmap_local_post_map local_flush_tlb_kernel_page
>     - arch_kmap_local_post_map is further used around kmap
> 
> I would like to double check this is safe. From errata itself,
> I cannot make up whether it depends to context, I have impression
> it doesnt, and one should apply it even in e.g. when map/unmap
> is done in interrupt.
> 
> I hope you still remember this topic. Would you please be able
> to help to clarify whether applying it depends to context?

IIRC this erratum is problematic only when there are concurrent CPUs
still accessing the mapping being modified. That's usually when touching
user pages (e.g. for migration, write-back) and the kernel either goes
through a break-before-make sequence or changes the PTE permissions. I
don't think any of the functions you mentioned fall into this category
(of concurrent accesses to the VA being unmapped).

I found the erratum on page 28 in this document:

https://documentation-service.arm.com/static/5fb64a3bd77dd807b9a80852

-- 
Catalin



More information about the linux-arm-kernel mailing list