From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: ARC-Seal: i=1; a=rsa-sha256; t=1517060567; cv=none; d=google.com; s=arc-20160816; b=NvbWgQmKJkoxs1hadrb4VMzUVaFOrMDp1JCD0W8wnluSzUcRB5DAoc92zV2gCfvX9H sKn/HdSSsq8ElrL/NeCBjPqoNCPVA38pEbTz0HJmIqiyx6hI4rUkCEf4fUKdIVCGdJKq 4ezUNPK6X3TJnaBrqXZNfx+RQitEkjlEye5PYGU/4U5BQ97Do4EAXGXB2x/8OvcH3E0R 1ClPbAFTPPYl2Gu+PsQb1Y3UCgimBnxBvo/nrd2+l/d8p3V94yfTSpEROSoS6RST4+BN NRMFQ5b+so9tQbfTwpeBNdndA6V+xu8/vs4NjR9XZZIxbUtDYPVCav5Lafi4SmSgmO6u uamg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:sender:dkim-signature :arc-authentication-results; bh=LM9LOAJC9mll0NMZRJrbCQObA4pzTfu9r6osCQAAxe4=; b=i3cYV5VW18sN1pctGN7Xh32JoFLIeTzd+q5gEVxuB+/JHpejKOvfVwej2l2dIPjRit IcfHDN3RycqQ67g7UGHmZyXqDmsQgLqHg9GvF0yGkixvWuD4+OI9Mho+FnoYhwXywVrZ SN+fF0I6r6LWHpOKJOQY6ayTViTeMnFEUovGsOw4zO4cjryxGVsLp5tY1/QoGUgFnqKu 2if/d1/hxCUpoMGdQuL961dpj05Xr562o7hE4psOe4GmqvoaOgX4vYA/37mmTXLqAqlT 6nGcHZgOKkS3TeIHKXD3Wyco3qoen+ofjusgSnCaOhcsyot6pOUegyKbkq5/RoBOgjKB SCPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YmJfPXsu; spf=pass (google.com: domain of konrad.r.wilk@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=konrad.r.wilk@gmail.com Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YmJfPXsu; spf=pass (google.com: domain of konrad.r.wilk@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=konrad.r.wilk@gmail.com X-Google-Smtp-Source: AH8x227nV9OxUYnX/KFnjMnZ2nXlkTxmTbBKXQ/XwqjPuyU5T6Zjwqgshj7tTPIPjkL2UBHfQjeVtA== Sender: Konrad Rzeszutek Wilk Date: Sat, 27 Jan 2018 08:42:43 -0500 From: Konrad Rzeszutek Wilk To: "Hansen, Dave" 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 , Paolo Bonzini , Linux Kernel Mailing List , Peter Zijlstra , Thomas Gleixner , Greg Kroah-Hartman , Masami Hiramatsu , Arjan van de Ven , Tom Lendacky , "Williams, Dan J" , Joerg Roedel , Andrea Arcangeli , KVM list , Boris Ostrovsky Subject: Re: [RFC 09/10] x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation 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 Content-Disposition: inline In-Reply-To: <0089A7AA75120F4087B2E7CB6BF3E53442A9AA0A@CRSMSX104.amr.corp.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590140582166248265?= X-GMAIL-MSGID: =?utf-8?q?1590753301901281265?= X-Mailing-List: linux-kernel@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).