From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932435AbbCYOS2 (ORCPT ); Wed, 25 Mar 2015 10:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34367 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932280AbbCYOSZ (ORCPT ); Wed, 25 Mar 2015 10:18:25 -0400 Date: Wed, 25 Mar 2015 15:15:57 +0100 From: Oleg Nesterov To: Borislav Petkov Cc: Rik van Riel , Andy Lutomirski , Dave Hansen , Thomas Gleixner , "linux-kernel@vger.kernel.org" , X86 ML , Dave Hansen , Suresh Siddha , Ingo Molnar , "H. Peter Anvin" , Fenghua Yu Subject: Re: [PATCH 01/17] x86, fpu: wrap get_xsave_addr() to make it safer Message-ID: <20150325141557.GA21694@redhat.com> References: <1427235664-25318-1-git-send-email-dave.hansen@intel.com> <1427235664-25318-2-git-send-email-dave.hansen@intel.com> <5511F65A.5020505@intel.com> <5511FD59.3040503@intel.com> <551208F8.1090806@redhat.com> <20150325090824.GB3291@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150325090824.GB3291@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/25, Borislav Petkov wrote: > > On Tue, Mar 24, 2015 at 09:01:44PM -0400, Rik van Riel wrote: > > Indeed, __save_init_fpu (yeah, terrible name) will save > > the in-register state to memory for you, so you can > > inspect it. > > > > Is there any reason not to rename __save_init_fpu to > > save_fpu_state, or just save_fpu? > > That whole place there needs more rubbing. > > So the way I see it, the "init" thing also says that the FPU is intact. Yes, this is my understanding too. And note that nobody actually wants this "init" part, so it actually means "destroy". I agree we should rename it later (at least). Plus unlazy_fpu() looks confusing too. Nobody actually wants to "unlazy", the callers want to save FPU state. So it could be named save_fpu_state() too ;) Oleg.