Received: by 10.223.176.5 with SMTP id f5csp688079wra; Sat, 27 Jan 2018 07:55:52 -0800 (PST) X-Google-Smtp-Source: AH8x2278orO6XIHuv8FKkRuiKM2oTMGgLjtkVaHd3A8m7o4NcvSTWgnXpCQIT7Im7PL51uhlfiKK X-Received: by 2002:a17:902:6f08:: with SMTP id w8-v6mr16997364plk.155.1517068551969; Sat, 27 Jan 2018 07:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517068551; cv=none; d=google.com; s=arc-20160816; b=iXq0HVO1rnmqSQfq+X2cUmiOKGpv6LJVcvWOFpupVs7mf/oy48Ver+3cdkknpIDf/U jV50JeUB+0NCaKflxtxWUtsU0urD+1eXSiCgrxg4FnYqP3FG0qxYaA5CZX8XQiKgx4jj xpbw9g3HewQDt5Bicrh+Aywb9lgleJcNFkl1fVhlsM1OCctY4KR9k3JDcGCyUBlhs1Td IXiFKgHGGaOyWZ/0E5Z5XumUCeTUthwU+lugov+wXfza3HUpAxhthifBItcaY2XfAcsC eprG5+KBxQ65oE8Nu+6MJPFNWqQdaZRlOKLBj5jLSVChBvuG83CE2fSX4ghGtS6aEPav g3uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=3xkR0i5FzjgvdddwYZbvl61SuZROrRt1qGJhCTlJiEU=; b=JHCUae+qB9vVoiwF2biqHlznmnZbOH7PZIcYAZpuCMVmG1YGZsZENjzT9MZWsTW4ke qQ9aWUrCYPE98cimISt/J2YsGKWaDNCo7eSfbAA4zL2+blMIq+Na5QNXp4Mc8BaVjw+u 4SymwnQ5w5cXkQMPrU7SdN8GQPLNgjspHPaaiGELPddqdlMDDxEsSKQPng4uVqIEi07r 3mpIGCnnToczt6fgW5kw/DoUq/bBYGwsSDOJ7Q3pX5wIqiBKBiLNaj5RW6D2nYoI+HY7 E6c39Au3FTJqRcTLt+t6RQdnhnk/trOcsrMsx4Qtt44Kh247vdhbfCX1jDsLjY0HWBwN OacQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k131si4552711pgc.145.2018.01.27.07.55.37; Sat, 27 Jan 2018 07:55:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080AbeA0PzP (ORCPT + 99 others); Sat, 27 Jan 2018 10:55:15 -0500 Received: from mga04.intel.com ([192.55.52.120]:1225 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168AbeA0PzN (ORCPT ); Sat, 27 Jan 2018 10:55:13 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jan 2018 07:55:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,422,1511856000"; d="scan'208";a="13567421" Received: from basavarn-mobl5.amr.corp.intel.com (HELO [10.252.136.11]) ([10.252.136.11]) by fmsmga008.fm.intel.com with ESMTP; 27 Jan 2018 07:55:10 -0800 Subject: Re: [RFC 09/10] x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation To: Konrad Rzeszutek Wilk 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> <20180127134239.GA25029@localhost.localdomain> Cc: Konrad Rzeszutek Wilk , Andi Kleen , Linus Torvalds , David Woodhouse , Liran Alon , Laura Abbott , Andrew Lutomirski , Janakarajan Natarajan , Borislav Petkov , "Mallick, Asit K" , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , 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 From: Dave Hansen Message-ID: <536542f0-99eb-742b-9d17-5b06e89ee383@intel.com> Date: Sat, 27 Jan 2018 07:55:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180127134239.GA25029@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/27/2018 05:42 AM, Konrad Rzeszutek Wilk wrote: > 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? Correct. The RSB is not used or updated by iret.