Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp422480imu; Mon, 26 Nov 2018 12:50:01 -0800 (PST) X-Google-Smtp-Source: AJdET5cETpX83v9hemFNeOc2K1DvG26M8YCftOnpt+C6ZhuYc6+tzDawwfOYdOdMZzOXOmBAt51v X-Received: by 2002:a62:7796:: with SMTP id s144mr29598378pfc.26.1543265401713; Mon, 26 Nov 2018 12:50:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543265401; cv=none; d=google.com; s=arc-20160816; b=FG4DGgIt/IhxOnA6g9jsYQ3mWTEyx7P3Uw55Fzub6KSzTTEtCVIzFjD0lD2VMUn3Kt xhMdoQzZ8o1PzRlUZ1qLe3ER/U1CNcinTe5wd2xWHALIVNPgoW2/xz9bhVnl79kWYwWz HtJd1jRXw1HAZPRca+a/Yefdf5TMMO2J1Y8rNd/gHXKwMwBSe80IRJFAjmbQnrPHQTQg 3m1RF3vm14g7KYzGPa0BBI25d+HMl8gWPywMDhoTaJ6McZmXUJC8AmE+j458UlW/qfB7 3lzsse/J/QaasAkydjNZ2wSu9BTYnhTqWKn1ZYFn0Vz6MOCntujvjvXa/YYl8HfhTTyD wGMw== 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; bh=rEdmHr58nOpJ/f5viOp0S+nnU0zxhzIIE25/hBLPAzI=; b=IRJDrLh2C0cG612ESHFfhH4oJgt8wSkqq3/mNu4alKXJ7fDskzZNxDLm3qQp6k7Uhg ozvwwLZL0l4ESoLQXu8SoFRMlIj5b6DwJpMF59u2HMhFp5PZgnSYymXzB8RlN1jFdnhG gitECbNLG8ZDvkV6dtgwVFd15bNTLANqgESmkxss+JadVfzFB+5NU5Jwe+SieM29aw7H IRKQTKAeUcntFkLtt2L0ZRmOoygsrVOvS91mYt2m3odmoCQ9dhF5pUoG0fZ9P3xop+fM xs0dLFWnFPIKoWFPcqMYFH2DjhASSBlD9DXaTlGwNjg45oxfrycmUh9HJbiyQIK5GRX5 y+Xg== 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 38si1323710pln.313.2018.11.26.12.49.45; Mon, 26 Nov 2018 12:50:01 -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 S1727295AbeK0HoE (ORCPT + 99 others); Tue, 27 Nov 2018 02:44:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57722 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727056AbeK0HoE (ORCPT ); Tue, 27 Nov 2018 02:44:04 -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 7D9D28CAF; Mon, 26 Nov 2018 20:48:43 +0000 (UTC) Received: from sky.random (ovpn-120-160.rdu2.redhat.com [10.10.120.160]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 35C47608E6; Mon, 26 Nov 2018 20:48:43 +0000 (UTC) Date: Mon, 26 Nov 2018 15:48:42 -0500 From: Andrea Arcangeli To: Thomas Gleixner Cc: Linus Torvalds , Linux List Kernel Mailing , the arch/x86 maintainers , Peter Zijlstra , Andrew Lutomirski , Jiri Kosina , thomas.lendacky@amd.com, Josh Poimboeuf , 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 Message-ID: <20181126204842.GC16136@redhat.com> References: <20181125183328.318175777@linutronix.de> <20181125185006.051663132@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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.38]); Mon, 26 Nov 2018 20:48:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Sun, Nov 25, 2018 at 11:28:59PM +0100, Thomas Gleixner wrote: > Indeed. Just checked the documentation again, it's also not clear whether > IBPB is required if STIPB is in use. I tried to ask this question too earlier: https://lkml.kernel.org/r/20181119234528.GJ29258@redhat.com If the BTB mistraining in SECCOMP context with STIBP set in SPEC_CTRL, can still influence the hyperthreading sibling after STIBP is cleared, IBPB is needed before clearing STIBP. Otherwise it's not. Unless told otherwise, it'd be safe to assume IBPB is needed in such case. The SPEC_CTRL MSR specs seems a catch-all lowest common denominator and so intuition or measurement of the exact behavior in one CPU model, don't necessarily give a result that can be applied to all microcodes out there. Thanks, Andrea