From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbbCYM6W (ORCPT ); Wed, 25 Mar 2015 08:58:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45612 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752646AbbCYM6S (ORCPT ); Wed, 25 Mar 2015 08:58:18 -0400 Date: Wed, 25 Mar 2015 13:56:13 +0100 From: Oleg Nesterov To: Rik van Riel Cc: Andy Lutomirski , Dave Hansen , Thomas Gleixner , "linux-kernel@vger.kernel.org" , X86 ML , Dave Hansen , Suresh Siddha , Ingo Molnar , "H. Peter Anvin" , Fenghua Yu , Borislav Petkov Subject: Re: [PATCH 01/17] x86, fpu: wrap get_xsave_addr() to make it safer Message-ID: <20150325125613.GB17191@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551208F8.1090806@redhat.com> 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/24, Rik van Riel wrote: > > On 03/24/2015 08:18 PM, Andy Lutomirski wrote: > Is there any reason not to rename __save_init_fpu to > save_fpu_state, or just save_fpu? Please see another email. __save_init_fpu() saves the FPU state but it can also change the FPU registers. At least I think so ;) Otherwise, why switch_fpu_prepare() resets .last_cpu if it returns zero? And unlazy_fpu() should do the same. This all needs the cleanups, yes. Oleg.