From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761944AbbEER2U (ORCPT ); Tue, 5 May 2015 13:28:20 -0400 Received: from mail.skyhub.de ([78.46.96.112]:57238 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761908AbbEER14 (ORCPT ); Tue, 5 May 2015 13:27:56 -0400 Date: Tue, 5 May 2015 19:27:53 +0200 From: Borislav Petkov To: Dave Hansen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, dave.hansen@linux.intel.com, oleg@redhat.com, riel@redhat.com, sbsiddha@gmail.com, luto@amacapital.net, mingo@redhat.com, hpa@zytor.com, fenghua.yu@intel.com Subject: Re: [PATCH 01/17] x86, fpu: wrap get_xsave_addr() to make it safer Message-ID: <20150505172753.GN3910@pd.tnic> References: <20150422182729.0512E57D@viggo.jf.intel.com> <20150422182731.4E4F8448@viggo.jf.intel.com> <20150425093119.GD32099@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150425093119.GD32099@pd.tnic> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 25, 2015 at 11:31:19AM +0200, Borislav Petkov wrote: > On Wed, Apr 22, 2015 at 11:27:31AM -0700, Dave Hansen wrote: > > > > From: Dave Hansen > > > > Changes from "v19": > > * remove 'tsk' argument to get_xsave_addr() since the code > > can only realistically work on 'current', and fix up the > > comment a bit to match. > > > > Changes from "v17": > > * fix s/xstate/xsave_field/ in the function comment > > * remove EXPORT_SYMBOL_GPL() > > > > --- > > From: Dave Hansen > > > > The MPX code appears to be saving off the FPU in an unsafe > > way. It does not disable preemption or ensure that the > > FPU state has been allocated. > > > > This patch introduces a new helper which will do both of > > those things internally. > > > > Note that this requires a patch from Oleg in order to work > > properly. It is currently in tip/x86/fpu. > > > > > commit f893959b0898bd876673adbeb6798bdf25c034d7 > > > Author: Oleg Nesterov > > > Date: Fri Mar 13 18:30:30 2015 +0100 > > > > > > x86/fpu: Don't abuse drop_init_fpu() in flush_thread() > > > > Signed-off-by: Dave Hansen > > Cc: Oleg Nesterov > > Cc: bp@alien8.de > > Cc: Rik van Riel > > Cc: Suresh Siddha > > Cc: Andy Lutomirski > > Cc: Thomas Gleixner > > Cc: Ingo Molnar > > Cc: "H. Peter Anvin" > > Cc: Fenghua Yu > > Cc: the arch/x86 maintainers > > --- > > > > b/arch/x86/include/asm/xsave.h | 1 + > > b/arch/x86/kernel/xsave.c | 32 ++++++++++++++++++++++++++++++++ > > 2 files changed, 33 insertions(+) > > Applied, thanks. Yeah, I said "Applied" but didn't know at the time Ingo was doing the big FPU cleanup: https://lkml.kernel.org/r/1430843228-13749-1-git-send-email-mingo@kernel.org So let's wait until the dust settles, I think rediffing this patch should be easy and simply made to call fpu__save() which is the new name but we'll have to doublecheck. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --