Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756062AbcJQXFb (ORCPT ); Mon, 17 Oct 2016 19:05:31 -0400 Received: from mga02.intel.com ([134.134.136.20]:38539 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbcJQXFX (ORCPT ); Mon, 17 Oct 2016 19:05:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,359,1473145200"; d="scan'208";a="180790980" Date: Mon, 17 Oct 2016 16:04:17 -0700 From: Yu-cheng Yu To: Andy Lutomirski Cc: Rik van Riel , Dave Hansen , "linux-kernel@vger.kernel.org" , Ingo Molnar , Borislav Petkov , Linus Torvalds , Andrew Lutomirski , dave.hansen@intel.linux.com, Thomas Gleixner , "H. Peter Anvin" Subject: Re: [PATCH RFC 1/3] fpu/x86: add make_fpregs_active(_newstate) helper functions Message-ID: <20161017230416.GA18900@test-lenovo> References: <1476734984-13839-1-git-send-email-riel@redhat.com> <1476734984-13839-2-git-send-email-riel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 557 Lines: 16 On Mon, Oct 17, 2016 at 01:57:06PM -0700, Andy Lutomirski wrote: > Dave and/or Yu-cheng: didn't one of you have some code to allow a user > xstate buffer to be filled from the copy in kernel memory? If we did > that, we could avoid this mess entirely. In copy_fpstate_to_sigframe() (arch/x86/kernel/fpu/signal.c), the assumption was we have lazy fpu: if (fpregs_active() || we want an #NM exception) copy_fpregs_to_sigframe(); else copy kernel buffer to user buffer; But this is not the true anymore. Or do you mean something else? -- Yu-cheng