From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 126BCC43441 for ; Tue, 27 Nov 2018 07:30:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CAA1B21104 for ; Tue, 27 Nov 2018 07:30:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAA1B21104 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729103AbeK0S1I (ORCPT ); Tue, 27 Nov 2018 13:27:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:58204 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728977AbeK0S1I (ORCPT ); Tue, 27 Nov 2018 13:27:08 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 90C60AEA6; Tue, 27 Nov 2018 07:30:09 +0000 (UTC) Date: Tue, 27 Nov 2018 08:30:07 +0100 (CET) From: Jiri Kosina To: Thomas Gleixner cc: Tim Chen , Ingo Molnar , LKML , x86@kernel.org, Peter Zijlstra , Andy Lutomirski , Linus Torvalds , Tom Lendacky , Josh Poimboeuf , Andrea Arcangeli , David Woodhouse , Andi Kleen , Dave Hansen , Casey Schaufler , Asit Mallick , Arjan van de Ven , Jon Masters , Waiman Long , Greg KH , Dave Stewart , Kees Cook Subject: Re: [patch 20/24] x86/speculation: Split out TIF update In-Reply-To: Message-ID: References: <20181121201430.559770965@linutronix.de> <20181121201724.227260385@linutronix.de> <20181123073735.GA12959@gmail.com> 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 Tue, 27 Nov 2018, Thomas Gleixner wrote: > That's racy and does not prevent the situation because the TIF flags are > updated befor the UPDATE bit is set. > So __speculation_ctrl_update() might see the new bits, but not > TIF_SPEC_UPDATE. Hm, right, scratch that. We'd need to do that before updating TIF_SPEC_IB in task_update_spec_tif(), but that has the opposite ordering issue. Thanks, -- Jiri Kosina SUSE Labs