From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933748AbbCPOmF (ORCPT ); Mon, 16 Mar 2015 10:42:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43739 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932927AbbCPOmB (ORCPT ); Mon, 16 Mar 2015 10:42:01 -0400 Date: Mon, 16 Mar 2015 15:39:44 +0100 From: Oleg Nesterov To: Borislav Petkov Cc: Dave Hansen , Ingo Molnar , Andy Lutomirski , Linus Torvalds , Pekka Riikonen , Rik van Riel , Suresh Siddha , LKML , "Yu, Fenghua" , Quentin Casasnovas Subject: Re: [PATCH 4/4] x86/fpu: don't abuse drop_init_fpu() in flush_thread() Message-ID: <20150316143944.GA3300@redhat.com> References: <20150313161958.GI31998@pd.tnic> <20150313162654.GA26453@redhat.com> <20150313192717.GJ31998@pd.tnic> <20150314144816.GA13029@redhat.com> <20150315173620.GA29134@pd.tnic> <20150315181643.GA488@redhat.com> <20150315185048.GB29134@pd.tnic> <20150315200436.GA30079@redhat.com> <20150315203816.GC29134@pd.tnic> <20150316093537.GC22995@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150316093537.GC22995@pd.tnic> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/16, Borislav Petkov wrote: > > -static inline void drop_init_fpu(struct task_struct *tsk) > +/* > + * Reset the FPU state in the eager case and drop it in the lazy case (later use > + * will reinit it). > + */ > +static inline void fpu_reset_state(struct task_struct *tsk) ACK! Perhaps you can also find a beter name for __save_init_fpu/etc ;) The name clearly suggests that it does "save + init" while in fact it does "save and may be destroy FPU state". At least for the callers, the fact that "destroy" is actually "init" doesn't really matter. But lets not rename it right now. This can conflict with the fixes we need to do first. Oleg.