Received: by 10.223.176.46 with SMTP id f43csp925542wra; Sat, 20 Jan 2018 07:23:21 -0800 (PST) X-Google-Smtp-Source: AH8x227IL97karBrMVpXk8m8+pin7+dLCPv22K8HsIMFeYV35rb19jZT5UETFZbUYrk8LKcIL5gU X-Received: by 10.98.29.2 with SMTP id d2mr2740003pfd.204.1516461801179; Sat, 20 Jan 2018 07:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516461801; cv=none; d=google.com; s=arc-20160816; b=AVrd+0IinKdbH7TKbGzZH4auax+xDOIO9rRPEirt/ANqnDPGGdSCpM7AOCRf64RL+T JaSgwMeiU010QEztjppbsA6zp7WYOKlGkC7qWPW8cSGlWtOGA7rPfAxRsy/HAXIY+T9e I4OTWwV4nVsvqCkbkQtIRa+4ZaIAsFhZp2E26/smEvQjtCXhvmDVF+IHMy5dddfiy01x ACkgKvttYrow+HTsHtXqVXi+1kkiUUitU9Ear7mJbH3u4Fvepyj68MqCj17YA/hhQ56b PsE3LUrLFkORMm7bTGKh3hPBT9q7AJpnLzNKKysLn8J6G9Nh0gjvj6QpkZRF72IQkZbU y1Zw== 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:arc-authentication-results; bh=0cR8ZFYi8Tq5pjRh6Cgpui8RhaWI75WmKptEnGOT5Cg=; b=pWK3C9RB2tY2qXGSYF4f36VZ3ERLNSpavh+S2U2OQ2hprzfPqA//jGuzYiI/w9nVrn cT5PGiCLd8fzHKXQFshTq/pqDToLgQ9ZJW9rGmsDB5lHCWjweFqTHs14rwGl8QVMDVlW SCdcjq/QludxRX7l6LUNQSM3+9QgF0PYyPpLyU6TAYIR+SRjVzCr3oLH2VBy3WFD72zT AZCe0t2zqxNN3ketx+mKWxuG4Rada7906MDWfZnsoqC8hpf0tbpW4NatQ52mzuIpryCi +cF+yNJoVQbA4LXiPsrmLKYQHhtqpJiK4TYVaDJ24QwJCQDvx0XGJw6Lp/tH64MXlZyj 5zbA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2-v6si1784221plj.712.2018.01.20.07.23.07; Sat, 20 Jan 2018 07:23:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756071AbeATPWe (ORCPT + 99 others); Sat, 20 Jan 2018 10:22:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46616 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754913AbeATPWb (ORCPT ); Sat, 20 Jan 2018 10:22:31 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84633C0587F3; Sat, 20 Jan 2018 15:22:31 +0000 (UTC) Received: from mail.random (ovpn-116-144.ams2.redhat.com [10.36.116.144]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B621A6090B; Sat, 20 Jan 2018 15:22:30 +0000 (UTC) Date: Sat, 20 Jan 2018 16:22:29 +0100 From: Andrea Arcangeli To: "Van De Ven, Arjan" Cc: David Woodhouse , Hou Tao , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , Thomas Gleixner , "ak@linux.intel.com" , "dave.hansen@linux.intel.com" , "peterz@infradead.org" , "qiuxishi@huawei.com" , "wangkefeng.wang@huawei.com" Subject: Re: [RH72 Spectre] ibpb_enabled = 1 leads to hard LOCKUP under x86_64 host machine Message-ID: <20180120152229.GA2042@redhat.com> References: <12e55119-4f5b-da63-2b1c-14fb70243b21@huawei.com> <1516438985.5087.71.camel@infradead.org> <0575AF4FD06DD142AD198903C74E1CC87A5EC9AE@ORSMSX103.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0575AF4FD06DD142AD198903C74E1CC87A5EC9AE@ORSMSX103.amr.corp.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 20 Jan 2018 15:22:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello everyone, On Sat, Jan 20, 2018 at 01:56:08PM +0000, Van De Ven, Arjan wrote: > well first of all don't use IBRS, use retpoline This issue triggers in the IBPB code during user to user context switch and IBPB is still needed there no matter if kernel is using retpolines or if it uses kernel IBRS. In fact IBPB is still needed there even if retpolines+user_ibrs is used or if always_ibrs/ibrs_enabled=2 is used (IBRS doesn't protect from the poison generated in the same predictor mode, "especially" in future CPUs). Only retpolining all userland would avoid IBPB here, but I doubt you suggest that. Kernel retpolines or kernel IBRS would make zero difference for this specific issue. > and if Andrea says this was a known issue in their code then I think that closes the issue. > It's an implementation bug we inherited from the merge of a CPU vendor patch and I can confirm it's already closed. The fix has been already shipped with the wave 2 update in fact and some other versions even had the bug fixed since the very first wave on 0day. That deadlock nuisance only ever triggered in artificial QA testcases and even then it wasn't easily reproducible. We already moved the follow ups in vendor BZ to avoid using bandwidth here. Thank you! Andrea