Received: by 10.213.65.68 with SMTP id h4csp1777473imn; Mon, 19 Mar 2018 13:00:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELuufPWbHIAEZvz4NdswG2WiZfxn2O2kjufZPZJoc0bdzFJ98dXKqoTgVQgjBxK3G2GLEevC X-Received: by 10.98.213.9 with SMTP id d9mr4712165pfg.234.1521489649202; Mon, 19 Mar 2018 13:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521489649; cv=none; d=google.com; s=arc-20160816; b=qvMNBqNiGTXWCOY6bQ+FKCWUOsb320tDHeWiwQGB2drEBEIGKQblUfe4YyiVGWijox GOWcs1AO5QFM8QT/Sopw+lAFyqPR14WbF7cm/RCoS5aOz1jFrhVXNmYkXeLet24j1yGS kkR66WlsY8TL1c9k1D7e61VsqbUfbvD91k2DB884d/+Yy9sQ39vGfffmkNQomSpK8Bc2 WdQtm/eVqVoY8N2rHSRJzJVtVEBsMzIyx6iAmmX8R1e2Ptv0i9kZkuUe4an/tn2CMBt2 icLttXeX9uG+u5oZ4qG7E49R8HQILrXEpZBuRVbGNngr8o4MOnP0wldr+OD/bs3VmeaQ idBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=4TSO1+skapMQMZTyi66C8oeXVuG9MZK35QzI4wdQzUA=; b=hHfQgf4gqiqIhNaKcaP3KWfayoCOmhJXdwy0lMBV4MHKvBXXL/cl2lEseX/Ri87Fza yFbyqIXIjpDYAjINPFdCaPfUwJmkwvO/1c94cFJXtw2d2mqHwc4RzWWQyDayBvpfb4eE Qp4+xdJCNt5SMy2C5asayFBZczEKxOIttmkU3dbhGx6dnchW+nCdiUaQ9l+qR8fixnTm 37zs0LGS9Tucqh/S9Zc2TEyiPvZrhua1e1trbk460Yj2fmmyb/NEIl0RdzDYNu6YYiRJ qU6pfcQ9WcRi6pYNdWWP1slLr59g92CQscRrxQBSw6MY+6EBuC+qEKO8taTdCuap+Ec9 Wqvg== 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 p11-v6si595570pli.599.2018.03.19.13.00.34; Mon, 19 Mar 2018 13:00:49 -0700 (PDT) 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 S1031005AbeCST6p (ORCPT + 99 others); Mon, 19 Mar 2018 15:58:45 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:32963 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936041AbeCST5x (ORCPT ); Mon, 19 Mar 2018 15:57:53 -0400 Received: from p4fea5f09.dip0.t-ipconnect.de ([79.234.95.9] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ey0uj-0000mf-5a; Mon, 19 Mar 2018 20:57:49 +0100 Date: Mon, 19 Mar 2018 20:57:48 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra cc: mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org Subject: Re: [PATCH 1/2] x86: Force asm-goto In-Reply-To: <20180319154717.652679334@infradead.org> Message-ID: References: <20180319154124.337947038@infradead.org> <20180319154717.652679334@infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Mar 2018, Peter Zijlstra wrote: > We want to start using asm-goto to guarantee the absence of dynamic > branches (and thus speculation). > > A primary prerequisite for this is of course that the compiler > supports asm-goto. This effecively lifts the minimum GCC version to > build an x86 kernel to gcc-4.5. > > Signed-off-by: Peter Zijlstra (Intel) > --- > Makefile | 13 +++++++------ > arch/x86/Makefile | 4 ++++ > 2 files changed, 11 insertions(+), 6 deletions(-) > > --- a/Makefile > +++ b/Makefile > @@ -494,6 +494,13 @@ RETPOLINE_CFLAGS_CLANG := -mretpoline-ex > RETPOLINE_CFLAGS := $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG))) > export RETPOLINE_CFLAGS > > +# check for 'asm goto' > +ifeq ($(shell $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y) Why are you not using the shell-cached version which you remove further down? Thanks, tglx