From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [RFC 09/10] x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation Date: Sat, 27 Jan 2018 08:42:43 -0500 Message-ID: <20180127134239.GA25029@localhost.localdomain> References: <7c0b0879-3448-43e4-8380-4708fc787113@default> <50c5d627-8975-184b-b50f-4cc02c5816c5@intel.com> <1516957886.30244.161.camel@infradead.org> <20180126175901.GL26209@tassilo.jf.intel.com> <20180126190257.GS14668@char.us.oracle.com> <0089A7AA75120F4087B2E7CB6BF3E53442A9AA0A@CRSMSX104.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Konrad Rzeszutek Wilk , Andi Kleen , Linus Torvalds , David Woodhouse , Liran Alon , Laura Abbott , Andrew Lutomirski , Janakarajan Natarajan , Borislav Petkov , "Mallick, Asit K" , Radim =?utf-8?B?S3LEjW3DocWZ?= , KarimAllah Ahmed , Peter Anvin , "Nakajima, Jun" , Ingo Molnar , the arch/x86 maintainers , "Raj, Ashok" , "Van De Ven, Arjan" , Tim Chen Return-path: Received: from mail-qt0-f194.google.com ([209.85.216.194]:38862 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbeA0Nms (ORCPT ); Sat, 27 Jan 2018 08:42:48 -0500 Content-Disposition: inline In-Reply-To: <0089A7AA75120F4087B2E7CB6BF3E53442A9AA0A@CRSMSX104.amr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jan 26, 2018 at 07:11:47PM +0000, Hansen, Dave wrote: > The need for RSB stuffing in all the various scenarios and what the heck it actually mitigates is freakishly complicated. I've tried to write it all down in one place: https://goo.gl/pXbvBE Thank you for sharing that. One question on the third from the top (' RSB Stuff (16) After irq/nmi/#PF/...'). It says that :"Return from interrupt path (more than 16 deep) can empty RSB". Just to clarify - you mean all the returns ('ret') that are happening after we call do_IRQ and the stack unwinds - but before we do an 'iret' correct? I am 99% sure that is what you mean, but just confirming as one could read this as: 'Need to do RSB after an iret' (say you are in the kernel and then get an interrupt and iret back to kernel).