Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754281AbeAIAQZ (ORCPT + 1 other); Mon, 8 Jan 2018 19:16:25 -0500 Received: from mail-vk0-f42.google.com ([209.85.213.42]:34819 "EHLO mail-vk0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753014AbeAIAQX (ORCPT ); Mon, 8 Jan 2018 19:16:23 -0500 X-Google-Smtp-Source: ACJfBoupLpcyCeMDQeyJuXqQDC1Ht/heLteWCKVvOel0X/+2nPf972SZUZhtm+ZSviC35JoSsi+SMfBSlHTLSTHlOS0= MIME-Version: 1.0 In-Reply-To: <20180108222512.GC6718@tassilo.jf.intel.com> References: <20180108201531.6782-1-andi@firstfloor.org> <20180108221121.GU29822@worktop.programming.kicks-ass.net> <20180108222512.GC6718@tassilo.jf.intel.com> From: Paul Turner Date: Mon, 8 Jan 2018 16:15:51 -0800 Message-ID: Subject: Re: [PATCH] x86/retpoline: Avoid return buffer underflows on context switch To: Andi Kleen Cc: Peter Zijlstra , Andi Kleen , "Woodhouse, David" , LKML , Greg Kroah-Hartman , Tim Chen , Dave Hansen , Thomas Gleixner , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, Jan 8, 2018 at 2:25 PM, Andi Kleen wrote: >> 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. > Neither pause nor lfence stop speculation. > -Andi