Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2629685imu; Mon, 19 Nov 2018 03:43:03 -0800 (PST) X-Google-Smtp-Source: AJdET5cg7S4AlaeD2Dg3QXwU9fsodZHy7jBdt7EpCnwemJgTir6ToKQgRJx4QGSpF0m729wCS8hd X-Received: by 2002:a17:902:824:: with SMTP id 33-v6mr22501247plk.107.1542627783405; Mon, 19 Nov 2018 03:43:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542627783; cv=none; d=google.com; s=arc-20160816; b=Va8Z1g76xsPuC0NEaWbmkjOdbw3eUVNAsAnQibL8x5cX9lZEJts5M4u5d9rH3aJxr+ f0YjjJJDryoyOgtusNoxphgbiLkKRMF1iqs2N+8TBCwvz3pg+Z1JSHa4AlfUG7pkTl8j dNJ2dhsTMvF4gy/fVBr87R3AxJM/R2mnG8XdtOgWbArLCaYkUzUGm3kU6I9KQVjtAgt+ /cDcx5qtNclLvnpGPDOTvd+85XVEO0RVdCW5Je4Lf0VNbpNkeAX/LpBuQNc4cI9Ij49q Gp89iIMXQlrMcGDFaQUUBa8e7ZB+noXXjngAoNOzzJrk1NL99j8FVaSkmpHfGVs5XOI9 DTgg== 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=nCl/l9ZTgLtB0qWBs4G47pDvgqP3QpfJ0Ndj5XLPHkg=; b=thbyjcSm/imEGpADwcVnbMujqEhimHShu4VRoaykAbAxTLwk//TREFUqOtAvD9iJun tspcB+OBpdbshg8Wto3bPSMErbMoLloc5R7hkSUjzr6XwDzwg14HkEfmh1d7Re2037R0 UI9dg7tw9FmuSL3oZ/TaDP8TikFs23d+HSmXkWda6cSXbqzFNGI788jEGiwWius9cYG3 Y02EnuGdkxMuopr5gsSIjJ4dY8Qfj3xzeTurBC6o0bq2howtmLGMfcaY1V0305SQCnWZ 4K+dOlWdZsbW4hWW1H8qleG2cdcRCFL2AoQpWWlJnkZzgY5Zzt5a5AoQXqbPQ+lURh9j 1Q4w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd16si11196816plb.47.2018.11.19.03.42.48; Mon, 19 Nov 2018 03:43:03 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728727AbeKSWF1 (ORCPT + 99 others); Mon, 19 Nov 2018 17:05:27 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:38184 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728640AbeKSWF1 (ORCPT ); Mon, 19 Nov 2018 17:05:27 -0500 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1gOhw7-0005ZO-S1; Mon, 19 Nov 2018 12:41:51 +0100 Date: Mon, 19 Nov 2018 12:41:51 +0100 From: Sebastian Andrzej Siewior To: Dave Hansen Cc: Borislav Petkov , x86@kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org, Andy Lutomirski , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , kvm@vger.kernel.org, "Jason A. Donenfeld" , Rik van Riel , Dave Hansen Subject: Re: [PATCH] x86/fpu: Disable BH while while loading FPU registers in __fpu__restore_sig() Message-ID: <20181119114151.e4mbs7ktfjojl3uf@linutronix.de> References: <20181107194858.9380-1-bigeasy@linutronix.de> <20181107194858.9380-3-bigeasy@linutronix.de> <20181108145721.GC7543@zn.tnic> <20181109173521.2m6iijp5wkncgi77@linutronix.de> <20181109185202.GF21243@zn.tnic> <20181109232521.l2ll2n3coxygkxv4@linutronix.de> <20181112155643.vclej44qzg3pmbow@linutronix.de> <433cec57-57a9-afff-22f3-68308eda682b@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <433cec57-57a9-afff-22f3-68308eda682b@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-11-12 09:48:08 [-0800], Dave Hansen wrote: > On 11/12/18 7:56 AM, Sebastian Andrzej Siewior wrote: > > Use local_bh_disable() around the restore sequence to avoid the race. BH > > needs to be disabled because BH is allowed to run (even with preemption > > disabled) and might invoke kernel_fpu_begin(). > > FWIW, that would make nice comment fodder for the local_bh_disable(). > I'd much rather run into it there than in a changelog. Hmm. Should I really resent a v2 of this with the additional comment? This patch should go stable to the fix the bug and at the end of this series I remove/replace this hunk anyway. I can do either way, just wanted to check first. Sebastian