Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1688309imm; Thu, 20 Sep 2018 00:59:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1KBzmVAkieYkpqaatry2jOszoHGJ+WUxggF0XHslUdweauJNMrP8zGhfDKBg54kUr1ljk X-Received: by 2002:a17:902:1745:: with SMTP id i63-v6mr37941826pli.3.1537430351501; Thu, 20 Sep 2018 00:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537430351; cv=none; d=google.com; s=arc-20160816; b=AlogjGgXxKYPIyvqJEmQmfTobG/hiQ+GguVJHxpEwa2bLsX6xVpA2kZdvVqnk2KsmY 4Jy4JUe4ApTnP6CfbwsrJY/23cmSqakRthS9FrgrMJW/+aIMlNBiBz8D3TvCQU+JH4Ht K24um3O04uQ1zocW5E+bvRA8JuKw+VR6C4RQz6rhUUI+ciwVQJnWG9rYDfsyM9Z9hK0x e5YZIShK8O1vBa+0YvEdJUCb4PlHN0SHX0RPO9Ckw150tFq0tejm8vroSQI+PQLKlAGL B1JlnFqLTY7qQu+HuO1ox/P340LUdKqBAjtmbiDS1aJ7VYI9uiNQqKye4CEyCgvq3/TK CuAw== 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; bh=7E0FRItJ2432DffZFxbBE3fsZ6GvjipO9a8Ko3bTbQw=; b=K2iYrn7cpAaQKQBV5WK9XYRXwqXDZc/4uTLwrRogjcAbVH2rIUiIPgtnyw9PIZguVp 08fRo5UsWiY2d9cewoGr6ATBTb3Dq7ivSzrEYxQspGqKbadC8AEVQwWNW0yrvd7+PF2T drXfK4r5XeVUYarwCYfwACgmVcyoLnPkVVLIfZdtyZloOrz30yRO8c9/w/9PpNoOaTdc gHZxZGLNnFfmjgtGTLyOSh7ylzoubYBsb3y+ncF7OqEP87guzZZUtkHgQU8JM/GCFj/x p2Rov+uT5FxQnrvMwuDQAUZcDNh/6dFQJlX9RJKFPSXdKxjFQBqew0UN8e+ALWp4wcuw KKSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JyS5UCmO; 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 d30-v6si25330642pld.452.2018.09.20.00.58.55; Thu, 20 Sep 2018 00:59:11 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JyS5UCmO; 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 S1731413AbeITNjh (ORCPT + 99 others); Thu, 20 Sep 2018 09:39:37 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46110 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbeITNjg (ORCPT ); Thu, 20 Sep 2018 09:39:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7E0FRItJ2432DffZFxbBE3fsZ6GvjipO9a8Ko3bTbQw=; b=JyS5UCmOyVqOiVJ4acQgghl2F s3tqb5RHjspwqyu0vkLz9OZ9jh3iuidCNq3w7b1+aPeXyFZhVUtNpUVYHoc3MjwZneuz58I2gOu2Z LqD4AUOjwXvXHkc55fdDJq2jRkw6J7iH85STFnhMjXKi+Va1+o+h/m53vnBO0lcE+yntEc+RtYrEh rSDQ/0hWJihJaaR8DbbSpGdm1WHgFe/kkOkkkQJ3r4W1FKia1g4WLF58qhmfBuadYU5ZcohDi31ub C+fvGSgx0ZUNIkmmDHNWF1SopNaYem028fZUPAwKid5Gn2TZL+T/Gh3QUghtM6BGKLs3IjDpwjDKI DbHCwkwUA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2tpw-0005UE-Rm; Thu, 20 Sep 2018 07:57:21 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 491ED201EC166; Thu, 20 Sep 2018 09:57:17 +0200 (CEST) Date: Thu, 20 Sep 2018 09:57:17 +0200 From: Peter Zijlstra To: Tim Chen Cc: Jiri Kosina , Thomas Gleixner , Tom Lendacky , Ingo Molnar , Josh Poimboeuf , Andrea Arcangeli , David Woodhouse , Andi Kleen , Dave Hansen , Casey Schaufler , Asit Mallick , Arjan van de Ven , Jon Masters , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 2/2] x86/speculation: Provide application property based STIBP protection Message-ID: <20180920075717.GL24124@hirez.programming.kicks-ass.net> References: <0c55c162a077aadbfd57878e2694e35292c1a29c.1537392876.git.tim.c.chen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c55c162a077aadbfd57878e2694e35292c1a29c.1537392876.git.tim.c.chen@linux.intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 19, 2018 at 02:35:30PM -0700, Tim Chen wrote: > + if (get_dumpable(tsk->mm) != SUID_DUMP_USER) > + test_and_set_tsk_thread_flag(tsk, TIF_STIBP); > + else > + test_and_clear_tsk_thread_flag(tsk, TIF_STIBP); > +} s/test_and_//