Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2182602ybl; Thu, 19 Dec 2019 09:18:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwc29++z8Hh5asD+aP+RMn/24WQVIWwM/PtBf3oKgR/EptBL4h5LrVC8UbFPgwlGR2GnMTJ X-Received: by 2002:a9d:67d2:: with SMTP id c18mr9613748otn.362.1576775886408; Thu, 19 Dec 2019 09:18:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576775886; cv=none; d=google.com; s=arc-20160816; b=bCRM2waOywYSJxvbImXM5izcUg2w6NPohpBlP5DqEGLygc9TnHU+rjRUT5A+1A9c7N NmYsROQiqI8C5PBoy8BhmoP92AnzlL2vxxjvflcc32Q0eWbfMaeIpY7vAj13y8hgMgDy iYcwi4aASSrHCMCesLpM0LXka0OUXE6F4jf0RcF6vJO4/3RDz9GY7y0TYUE+xqhMPolE oP2HcR+z65yWX2DrjeVDhKjKMeI7Ow0mTKhk3GEP2fkUdp9R3rPwQyXqDmmrbnvUPOGh /zOApQyQhwmbT2Qll+DmFysQ3Z5bg+baH18kQsByWV0qmWggSjBXzF97lsh4v4h/ThgG OKug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PqTwp7q/nJxBPwc7ymMlMqISnqvm2GXH41ZuvANFncM=; b=t5sH5BTlPLivZvjvGx6g3TlIXNyta2oFyvITHxhXo4djpkZGJ9EgOFm2nflpiDn7XA TBycg2dqj4kP0lYzADKekq31qVxbZsG7PjIL3tdCsSf60yhykyqkDwFDfgEA+ItjCrSU y0HhmB+dlx3Cyk1FhxyYdH455foJLeQuU+p3pxdqpDSGmQH/JBX2wI3keJiJQIhKIEHk jou0Fxj8TKVx8i3e6VuPQMeR+8pnXh9XY+QJ41gUN8imBbYBETAHXpAjDD/qh6EvTcB2 UjQvn3W6Un0gOmveHXwCk+/5XJ6K6RJQr+dP45icY24LTyOOZfRij5oa6OUw0XnNsiNC KBzQ== 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 c26si160861otf.288.2019.12.19.09.17.52; Thu, 19 Dec 2019 09:18:06 -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 S1726961AbfLSRQm convert rfc822-to-8bit (ORCPT + 99 others); Thu, 19 Dec 2019 12:16:42 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:60394 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726801AbfLSRQm (ORCPT ); Thu, 19 Dec 2019 12:16:42 -0500 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1ihzPf-0007dO-6H; Thu, 19 Dec 2019 18:16:35 +0100 Date: Thu, 19 Dec 2019 18:16:35 +0100 From: Sebastian Andrzej Siewior To: Yu-cheng Yu Cc: linux-kernel@vger.kernel.org, x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Dave Hansen , Tony Luck , Andy Lutomirski , Borislav Petkov , Rik van Riel , "Ravi V. Shankar" , Fenghua Yu , Peter Zijlstra Subject: Re: [PATCH v2 3/3] x86/fpu/xstate: Invalidate fpregs when __fpu_restore_sig() fails Message-ID: <20191219171635.phdsfkvsyazwaq7s@linutronix.de> References: <20191212210855.19260-1-yu-cheng.yu@intel.com> <20191212210855.19260-4-yu-cheng.yu@intel.com> <20191218155449.sk4gjabtynh67jqb@linutronix.de> <587463c4e5fa82dff8748e5f753890ac390e993e.camel@intel.com> <20191219142217.axgpqlb7zzluoxnf@linutronix.de> <19a94f88f1bc66bb81dbf5dd72083d03ca5090e9.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <19a94f88f1bc66bb81dbf5dd72083d03ca5090e9.camel@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-12-19 08:44:08 [-0800], Yu-cheng Yu wrote: > Yes, this works. But then everywhere that calls copy_*_to_xregs_*() etc. needs to be checked. > Are there other alternatives? I don't like the big hammer approach of your very much. It might make all it "correct" but then it might lead to more "invalids" then needed. It also required to export the symbol which I would like to avoid. So if this patch works for you and you don't find anything else where it falls apart then I will audit tomorrow all callers which got the "invalidator" added and check for that angle. Unless someone here complains big tyme and wants this instead… > Yu-cheng Sebastian