Received: by 10.223.185.116 with SMTP id b49csp3506509wrg; Tue, 13 Feb 2018 03:29:41 -0800 (PST) X-Google-Smtp-Source: AH8x225jf7AXQFVJJ+NCm7PRiZthhb+BWRuKOQV3uYE6ncjCLgZ2DGQydrNHDNgKaWG23cTRfnRO X-Received: by 2002:a17:902:7246:: with SMTP id c6-v6mr832160pll.434.1518521381300; Tue, 13 Feb 2018 03:29:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518521381; cv=none; d=google.com; s=arc-20160816; b=OYLFi0b4b6X/z1SHpXVfIrnLeZQclrTrT4l09UFMwkCS2M8uTtiwXYh2Gity5XOLnx CNyENuNHSlYJ4hYQHJY0MXz89rg+3qwcVkCDP+omglTRv8Zu2nNrNyS6yZwBrVQEKFui 7HuA4FZ5r6qurydu7KuoCxTvimO5rKtIrxZWO3mwGUfbEyIBUd8T8Pt6pEyEQ/lbMZB1 jEBOC/q+ldtAMDCpVJcshPYgvxj+3TmaMVuDvDwja1rQ05JKCNVM9Nh43zTvurOQJLkL 2FB81ljKByAjvWlnJkCbDTLeTiWcsSjGxZmFdv3YS2t5SIk+k5S7AJxQ+EW+IQloVef7 FiYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=HAsThtWkmVQG5pK98SmeY6gVVNdb8PF/c8rG6ZvZRZk=; b=m3fZdZj66Rmfsx/g0ikd4stmvz1PMUFuVmYWO+O1rxvn+no6ybT8Nhd1hk9YklQWAu Joe9WZbfUDuFeinwKu8+suIY8KaDdjuA1ZZFFbTQw85rWr8dhdkExX7YX9jl7XEoO+3n juaH+T6KtdA2mZXyT4kVsR4X9U0K/Txygje3Ydc+R6lE6SeJidk1sOC3Rok38Sg16TMP Wp9Pqvp8Mo0izkPsqqXCvSBXsXGJPK3mu1aVJuUpWWgNa8AXFb9Zj9QYxhsjRIO5S00w AyC7AYL/0ngtue6tFYQckA0q7Yt8jcqGSHCtLeokQ8Xkq+hYlvi3GveLH+HfrFy1QVf4 32/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ifO9QSNL; 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 m12-v6si1086253pls.11.2018.02.13.03.29.26; Tue, 13 Feb 2018 03:29:41 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ifO9QSNL; 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 S934456AbeBML2r (ORCPT + 99 others); Tue, 13 Feb 2018 06:28:47 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:50480 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933926AbeBML2m (ORCPT ); Tue, 13 Feb 2018 06:28:42 -0500 Received: by mail-wm0-f66.google.com with SMTP id f71so15359859wmf.0; Tue, 13 Feb 2018 03:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HAsThtWkmVQG5pK98SmeY6gVVNdb8PF/c8rG6ZvZRZk=; b=ifO9QSNLrxk+86WoF5nki82iNjJoi+fhW/bzK7qxp+AzpK8cIDyBWf+JxXmkkiWHPX 2eqHqk3U0qK6N5UU/kUqts+2lEaBtxpiUYNjKYLmbVavEapyn08N9ADwCAgN4TzESnC/ H0t1dQzuZqKbcOf/N0M1+7p13+5DqgN8ojaO+UvrEq9JWe+awFRiiXic0leHBnURmm3z ODTLDXwcIYQfa+6HV2AXtTWukiaj0c9r5BGnQO4SYCILjeoGasszJ4BMKxN5rdgt6QQ+ 5e2CndtCPLDWuEMK6IwBA1XU//hv73AEec6Tm3JqaKtIW8orDW4pNOzQ5SApg4kcQ2om YjIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=HAsThtWkmVQG5pK98SmeY6gVVNdb8PF/c8rG6ZvZRZk=; b=P77TNp/dBl7GMzpbICA47sP9wV48G1pVJ7tWBuczx+jz+98JAQOD+XATbe5f4kf/5k xBy5XH0Vg+Jk2Am8tJXKM0RMH2QFU4I2I+6ys/QyG9OPNh4LpPp/yxwxl9NK2eWC7K6h jxANqhUMZVjhhEgTJXXQXYERd4Whj7EUDmkL1fj6z1MySwW1giFqcUk22eBDZhvWj3Ca aaKdsI/rCUADVSw9oyg3ljhAuU7up5rKMpr4u+WLUGaiVSyTgmybN/1YCa0aR25bp56/ REaMX7hei90bvHUiN366XZLEdiyLSoUiJqrMBJreyei7kkvET6bTmOOIRkTLo9fGXDSr Aqeg== X-Gm-Message-State: APf1xPD1+6pNYGBHpFQkmu2tUfho036jibv5mK3NCjfeb4IGYnF6pfc0 oueZalAB4QUj0ThlKB2BasI= X-Received: by 10.28.49.212 with SMTP id x203mr1024051wmx.28.1518521321412; Tue, 13 Feb 2018 03:28:41 -0800 (PST) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id e15sm6547184wmh.39.2018.02.13.03.28.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 03:28:40 -0800 (PST) Date: Tue, 13 Feb 2018 12:28:38 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: torvalds@linux-foundation.org, dave.hansen@linux.intel.com, bp@alien8.de, tglx@linutronix.de, arjan@linux.intel.com, linux-kernel@vger.kernel.org, dwmw2@infradead.org, hpa@zytor.com, gregkh@linuxfoundation.org, dan.j.williams@intel.com, dwmw@amazon.co.uk, luto@kernel.org, jpoimboe@redhat.com, linux-tip-commits@vger.kernel.org, Joe Konno Subject: Re: [tip:x86/pti] Revert "x86/speculation: Simplify indirect_branch_prediction_barrier()" Message-ID: <20180213112838.v2xu4qdnend5tflv@gmail.com> References: <1518305967-31356-3-git-send-email-dwmw@amazon.co.uk> <20180213094132.GF25201@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180213094132.GF25201@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > > On Tue, Feb 13, 2018 at 12:58:21AM -0800, tip-bot for David Woodhouse wrote: > > > --- a/arch/x86/include/asm/nospec-branch.h > > +++ b/arch/x86/include/asm/nospec-branch.h > > @@ -164,10 +164,15 @@ static inline void vmexit_fill_RSB(void) > > > > static inline void indirect_branch_prediction_barrier(void) > > { > > + asm volatile(ALTERNATIVE("", > > + "movl %[msr], %%ecx\n\t" > > + "movl %[val], %%eax\n\t" > > + "movl $0, %%edx\n\t" > > + "wrmsr", > > + X86_FEATURE_USE_IBPB) > > + : : [msr] "i" (MSR_IA32_PRED_CMD), > > + [val] "i" (PRED_CMD_IBPB) > > + : "eax", "ecx", "edx", "memory"); > > } > > Joe Konno pointed out that we now need the below line too, because we're > using MSR_IA32_PRED_CMD in this header. > > With the existing code that's not a problem per-se, but my objtool > retpoline annotation things did do stumble over this. > > Do we want to fold it into the objtool annotation patch or have it > separate? Separate would be better, it makes sense and is one problem less to worry about? Thanks, Ingo