Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4920267imu; Sun, 25 Nov 2018 12:53:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/UqIdTg1hSNSxgYubGHlXNHOJANAti+CSXjrXoVOFhVo4FJu4ZUB5lSIOyP6JYNBq6tKmq5 X-Received: by 2002:a17:902:6bc4:: with SMTP id m4mr9448891plt.93.1543179211506; Sun, 25 Nov 2018 12:53:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543179211; cv=none; d=google.com; s=arc-20160816; b=Qiobfpha8IJ7WYAbPQt3Y7X84/rM5CBVCUyTjtSw41CYWWVaKNbwxbqQDAORiW9hGm PmfFmG11TioCBl8rNoH0pgEhWuyeHui6dyc+OtwH5Y9pu2Mv12Lrbafb6PT4LFqR4Wmf CbyqazgzA+1dmJrXV5K2u+jsI9YT/ommgxyAN0a0ogm0ISVpDHPpCbyK+7fW5htPsp1z ke9vw26gQnA8AeDzcsYCRACAcpYIh+5piItS8sVhsk9WPmsacWoBbwb2NMy/xM2Kytnx NHv2Q0/FPiKokV2Ou9U/+crnWCXK+apzQbW7jBDv/+9vJ+N9/h/XifFITEeK0FR4lmyr azPw== 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; bh=ldvSXzCPvaUdgiTUd/beqYW9tqtWQW7Llw0O97dSxMY=; b=HwVF1y3MiE1vtsgBfj3ll7G8XPsjvcOF8Hm48bJvfxLujTs22EJ+XD10b7tdbSdWTg o021bWktotNZmZ2QuS3UfxXuHwiRqN5DXdQQz+hq+clRFN6P48h1y7Uo7S6Dp5yCfY2I J7hT+NfCfU5q4+Ed+cXD70E+kuuM/ERE1MaRtzl6LVuWjypmz0QhnCy32Bp5Q1thy+ZY 2BHS3MHP0RSpZo7NrVqATpLsKC/Eq+td93MffSo+KkVc6tUMH0m3tKRkJxheI930eaz4 zyZrJboXkbL2R7BRk8S9t8UFmE9zz+4GG0WwD8odec2iflKaTuzzUKf5O+83Uupl96fC M6Bw== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay7si8224700plb.410.2018.11.25.12.53.16; Sun, 25 Nov 2018 12:53:31 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726469AbeKZHog (ORCPT + 99 others); Mon, 26 Nov 2018 02:44:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:50330 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725863AbeKZHog (ORCPT ); Mon, 26 Nov 2018 02:44:36 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A9670AC38; Sun, 25 Nov 2018 20:52:38 +0000 (UTC) Date: Sun, 25 Nov 2018 21:52:36 +0100 (CET) From: Jiri Kosina To: Linus Torvalds cc: Thomas Gleixner , Linux List Kernel Mailing , the arch/x86 maintainers , Peter Zijlstra , Andrew Lutomirski , thomas.lendacky@amd.com, Josh Poimboeuf , Andrea Arcangeli , David Woodhouse , Tim Chen , Andi Kleen , dave.hansen@intel.com, Casey Schaufler , "Mallick, Asit K" , "Van De Ven, Arjan" , jcm@redhat.com, longman9394@gmail.com, Greg KH , david.c.stewart@intel.com, Kees Cook Subject: Re: [patch V2 27/28] x86/speculation: Add seccomp Spectre v2 user space protection mode In-Reply-To: Message-ID: References: <20181125183328.318175777@linutronix.de> <20181125185006.051663132@linutronix.de> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 25 Nov 2018, Linus Torvalds wrote: > > The mitigation guide documents how STIPB works: > > > > Setting bit 1 (STIBP) of the IA32_SPEC_CTRL MSR on a logical processor > > prevents the predicted targets of indirect branches on any logical > > processor of that core from being controlled by software that executes > > (or executed previously) on another logical processor of the same core. > > Can we please just fix this stupid lie? > > Yes, Intel calls it "STIBP" and tries to make it out to be about the > indirect branch predictor being per-SMT thread. > > But the reason it is unacceptable is apparently because in reality it just > disables indirect branch prediction entirely. So yes, *technically* it's > true that that limits indirect branch prediction to just a single SMT > core, but in reality it is just a "go really slow" mode. > > If STIBP had actually just keyed off the logical SMT thread, we wouldn't > need to have worried about it in the first place. > > So let's document reality rather than Intel's Pollyanna world-view. > > Reality matters. It's why we had to go all this. Lying about things > and making it appear like it's not a big deal was why the original > patch made it through without people noticing. Yeah, exactly; the documentation doesn't discourage STIBP use (well, the AMD one now actually does). I am all in favor of documenting the truth rather than the documented behavior, but I guess without having a word from CPU folks, explaining how exactly this is implemented in reality, we can just guess based on observed symptoms (which is what we'll do anyway I guess if we don't get any better / more accurate wording). Arjan, Tim, would you have a wording handy that would be guaranteed to describe the reality for the sake of changelog? Thanks, -- Jiri Kosina SUSE Labs