Thread (34 messages) flat view 34 messages, 4 authors, 2015-11-20

[PATCH v2 11/12] ARM: wire up UEFI init and runtime support

From: Ard Biesheuvel <hidden>
Date: 2015-11-16 19:04:00
Also in: linux-efi, linux-mm

On 16 November 2015 at 20:01, Russell King - ARM Linux
[off-list ref] wrote:
On Mon, Nov 16, 2015 at 07:32:36PM +0100, Ard Biesheuvel wrote:
quoted
+static inline void efi_set_pgd(struct mm_struct *mm)
+{
+     if (unlikely(mm->context.vmalloc_seq != init_mm.context.vmalloc_seq))
+             __check_vmalloc_seq(mm);
+
+     cpu_switch_mm(mm->pgd, mm);
+
+     flush_tlb_all();
+     if (icache_is_vivt_asid_tagged())
+             __flush_icache_all();
+}
I don't think that's sufficient.  There's a gap between switching the mm
and flushing the TLBs where we could have different global TLB entries
from those in the page tables - and that can cause problems with CPUs
which speculatively prefetch.  Some CPUs raise exceptions for this...
OK. So you mean set TTBR to the zero page, perform the TLB flush and
only then switch to the new page tables?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help