* Cortex A15: Errata 798181: Moving a virtual page that is being accessed by an active process can lead to unexpected behavior
@ 2023-02-22 9:07 Matija Glavinic Pecotic
2023-02-22 12:07 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Matija Glavinic Pecotic @ 2023-02-22 9:07 UTC (permalink / raw)
To: linux-arm-kernel, robh, catalin.marinas
Hello,
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?
Thanks,
Matija
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Cortex A15: Errata 798181: Moving a virtual page that is being accessed by an active process can lead to unexpected behavior
2023-02-22 9:07 Cortex A15: Errata 798181: Moving a virtual page that is being accessed by an active process can lead to unexpected behavior Matija Glavinic Pecotic
@ 2023-02-22 12:07 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2023-02-22 12:07 UTC (permalink / raw)
To: Matija Glavinic Pecotic; +Cc: linux-arm-kernel, robh
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-22 12:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-22 9:07 Cortex A15: Errata 798181: Moving a virtual page that is being accessed by an active process can lead to unexpected behavior Matija Glavinic Pecotic
2023-02-22 12:07 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).