From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932800AbeAHWZW (ORCPT + 1 other); Mon, 8 Jan 2018 17:25:22 -0500 Received: from mga09.intel.com ([134.134.136.24]:6714 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932509AbeAHWZU (ORCPT ); Mon, 8 Jan 2018 17:25:20 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,332,1511856000"; d="scan'208";a="165182679" Date: Mon, 8 Jan 2018 14:25:12 -0800 From: Andi Kleen To: Peter Zijlstra Cc: Andi Kleen , dwmw@amazon.co.uk, pjt@google.com, linux-kernel@vger.kernel.org, gregkh@linux-foundation.org, tim.c.chen@linux.intel.com, dave.hansen@intel.com, tglx@linutronix.de, luto@amacapital.net Subject: Re: [PATCH] x86/retpoline: Avoid return buffer underflows on context switch Message-ID: <20180108222512.GC6718@tassilo.jf.intel.com> References: <20180108201531.6782-1-andi@firstfloor.org> <20180108221121.GU29822@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180108221121.GU29822@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > So pjt did alignment, a single unroll and per discussion earlier today > (CET) or late last night (PST), he only does 16. I used the Intel recommended sequence, which recommends 32. Not sure if alignment makes a difference. I can check. > Why is none of that done here? Also, can we pretty please stop using > those retarded number labels, they make this stuff unreadable. Personally I find the magic labels with strange ASCII characters far less readable than a simple number. But can change it if you insist. > Also, pause is unlikely to stop speculation, that comment doesn't make > sense. Looking at PJT's version there used to be a speculation trap in > there, but I can't see that here. My understanding is that it stops speculation. But could also use LFENCE. -Andi