On Wed, Feb 24, 2016 at 8:41 AM, Borislav Petkov <b...@alien8.de> wrote: > On Wed, Feb 24, 2016 at 05:20:02PM +0100, Borislav Petkov wrote: >> That's mixed mode. I think you mean the FLUSH_TLB_ALL in efi_call. >> That's EFI on 64-bit but that is mandated by the spec, AFAIR. > > Ok, so mfleming set me straight on IRC - that's tip/master I should be > staring at. > > In any case, I think we should do __flush_tlb_all() in efi_call_cirt() > just in case, for the simple reason that EFI could be installing some > funky TLB entries which we don't want. I'm not saying it does and it > probably won't but what's stopping it? > > Or am I being overly paranoid?
I think you may be overly paranoid here. At least no working 32-bit EFI does this because we run it in compat mode. Any paging entries it inserts would be misinterpreted and likely immediately cause a crash. Also, the EFI code doesn't know a virtual address through which to reference the paging structures in the first place -- it could read CR3, but that gives a physical address, and it's not at all clear to me what even the crazier firmware authors would do with a physical address that doesn't live in EFI-defined ranges. --Andy