lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 1 Oct 2018 18:07:37 +0200 From: Peter Zijlstra <peterz@...radead.org> To: Rik van Riel <riel@...riel.com> Cc: linux-kernel@...r.kernel.org, kernel-team@...com, will.deacon@....com, songliubraving@...com, mingo@...nel.org, luto@...nel.org, hpa@...or.com, npiggin@...il.com Subject: Re: [PATCH 7/7] x86/mm/tlb: Make lazy TLB mode lazier On Tue, Sep 25, 2018 at 11:58:44PM -0400, Rik van Riel wrote: > @@ -594,8 +628,23 @@ void native_flush_tlb_others(const struct cpumask *cpumask, > (void *)info, 1); > return; > } > - smp_call_function_many(cpumask, flush_tlb_func_remote, > + > + /* > + * If no page tables were freed, we can skip sending IPIs to > + * CPUs in lazy TLB mode. They will flush the CPU themselves > + * at the next context switch. > + * > + * However, if page tables are getting freed, we need to send the > + * IPI everywhere, to prevent CPUs in lazy TLB mode from tripping > + * up on the new contents of what used to be page tables, while > + * doing a speculative memory access. > + */ > + if (info->freed_tables) > + smp_call_function_many(cpumask, flush_tlb_func_remote, > (void *)info, 1); > + else > + on_each_cpu_cond_mask(tlb_is_not_lazy, flush_tlb_func_remote, > + (void *)info, 1, GFP_ATOMIC, cpumask); > } And this is safe vs paravirt, because for native we now do _less_ invalidations. That might warrant a mention in the Changelog perhaps.
Powered by blists - more mailing lists