From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754104AbbCYRNg (ORCPT ); Wed, 25 Mar 2015 13:13:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59931 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081AbbCYRNb (ORCPT ); Wed, 25 Mar 2015 13:13:31 -0400 Date: Wed, 25 Mar 2015 18:11:13 +0100 From: Oleg Nesterov To: Dave Hansen Cc: Andy Lutomirski , Thomas Gleixner , "linux-kernel@vger.kernel.org" , X86 ML , Dave Hansen , Rik van Riel , 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: <20150325171113.GA29045@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> <20150325124533.GA17191@redhat.com> <5512C61E.3080308@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5512C61E.3080308@intel.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 Hi Dave, On 03/25, Dave Hansen wrote: > > It may get > called on CPUs without eager FPU mode on. > > > http://git.kernel.org/cgit/linux/kernel/git/daveh/x86-mpx.git/commit/?h=mpx-v16&id=92d3e7c1664f766142904904e27e126888adb8a7 > > http://git.kernel.org/cgit/linux/kernel/git/daveh/x86-mpx.git/commit/?h=mpx-v16&id=18049953ae43a7ffa084a01613c1684bdf24dd2e > > All that the MPX code wants here is to read the in-memory copy of the > MPX registers, or error out. Yes, iirc we alredy discussed these fixes ? I still think that the "if (!xstate)" check at the start of tsk_get_xsave_field() will look better, but this is cosmetic. > So, for the purposes of this series: > > With the (so far unmerged to Linus's tree) changes to unlazy_fpu(), does > tsk_get_xsave_field()'s use of unlazy_fpu() look correct? I think yes. But let me remind just in case that this depends on "x86, fpu: unlazy_fpu: don't do __thread_fpu_end() if use_eager_fpu()". > Should we also be renaming tsk_get_xsave_field() to something more > appropriate? Oh, don't ask me ;) To me it looks fine. Oleg.