From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754156AbbE1Op1 (ORCPT ); Thu, 28 May 2015 10:45:27 -0400 Received: from www.sr71.net ([198.145.64.142]:40036 "EHLO blackbird.sr71.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285AbbE1OpU (ORCPT ); Thu, 28 May 2015 10:45:20 -0400 Message-ID: <556729FE.1020007@sr71.net> Date: Thu, 28 May 2015 07:45:18 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ingo Molnar CC: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, dave.hansen@linux.intel.com, oleg@redhat.com, bp@alien8.de, riel@redhat.com, sbsiddha@gmail.com, luto@amacapital.net, mingo@redhat.com, hpa@zytor.com, fenghua.yu@intel.com Subject: Re: [PATCH 02/19] x86, fpu: Wrap get_xsave_addr() to make it safer References: <20150527183609.964CC3BA@viggo.jf.intel.com> <20150527183610.56178C96@viggo.jf.intel.com> <20150528084140.GA31719@gmail.com> In-Reply-To: <20150528084140.GA31719@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/28/2015 01:41 AM, Ingo Molnar wrote: > What you want here is to make the (in-memory) FPU state valid and current, before > reading it, and the function to use for that is fpu__activate_fpstate_read() > (available in the latest tip:x86/fpu tree). Do we really want to unconditionally activate the FPU? Let's say supporting MPX didn't require eager mode and someone called get_xsave_addr(). We would ideally want to keep the FPU inactive and just return NULL. Right?