From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFC 04/10] x86/mm: Only flush indirect branches when switching into non dumpable process Date: Sun, 21 Jan 2018 12:22:24 +0100 Message-ID: <20180121112224.GH2269@hirez.programming.kicks-ass.net> References: <1516476182-5153-1-git-send-email-karahmed@amazon.de> <1516476182-5153-5-git-send-email-karahmed@amazon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, Andi Kleen , Andrea Arcangeli , Andy Lutomirski , Arjan van de Ven , Ashok Raj , Asit Mallick , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Janakarajan Natarajan , Joerg Roedel , Jun Nakajima , Laura Abbott , Linus Torvalds , Masami Hiramatsu Return-path: Content-Disposition: inline In-Reply-To: <1516476182-5153-5-git-send-email-karahmed@amazon.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Sat, Jan 20, 2018 at 08:22:55PM +0100, KarimAllah Ahmed wrote: > From: Tim Chen > > Flush indirect branches when switching into a process that marked > itself non dumpable. This protects high value processes like gpg > better, without having too high performance overhead. So if I understand it right, this is only needed if the 'other' executable itself is susceptible to spectre. If say someone audited gpg for spectre-v1 and build it with retpoline, it would be safe to not issue the IBPB, right? So would it make sense to provide an ELF flag / personality thing such that userspace can indicate its spectre-safe? I realize that this is all future work, because so far auditing for v1 is a lot of pain (we need better tools), but would it be something that makes sense in the longer term?