From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751761AbbE0MSw (ORCPT ); Wed, 27 May 2015 08:18:52 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36784 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbbE0MSv (ORCPT ); Wed, 27 May 2015 08:18:51 -0400 Date: Wed, 27 May 2015 14:18:46 +0200 From: Ingo Molnar To: Dave Hansen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de Subject: Re: [PATCH 00/19] x86, mpx updates for 4.2 (take 7) Message-ID: <20150527121845.GA28140@gmail.com> References: <20150519062528.E2D5DDFF@viggo.jf.intel.com> <20150520100548.GA19925@gmail.com> <5564A40D.6010002@sr71.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5564A40D.6010002@sr71.net> 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 * Dave Hansen wrote: > On 05/20/2015 03:05 AM, Ingo Molnar wrote: > >> > > >> > This sees breakage unless either booted with 'noxsaves' > >> > or if it has Fenghua's set from here applied: > >> > > >> > http://lkml.kernel.org/r/1429678319-61356-1-git-send-email-fenghua.yu@intel.com > >> > > >> > This set is also available against 4.1-rc3 in git: > >> > > >> > git://git.kernel.org/pub/scm/linux/kernel/git/daveh/x86-mpx.git mpx-v22 > > > Yeah, so as a first step, could you please test that the patch below solves > > the crashes as well, without having to specify 'noxsaves' on the boot line? > > Yes, that does seem to make it happy in lieu of Fenghua's patches. Great, thanks for testing it! I'll send it to Linus as part of x86/urgent. > > + /* > > + * Quirk: we don't yet handle the XSAVES* instructions > > + * correctly, as we don't correctly convert between > > + * standard and compacted format when interfacing > > + * with user-space - so disable it for now. > > + * > > + * The difference is small: with recent CPUs the > > + * compacted format is only marginally smaller than > > + * the standard FPU state format. > > + * > > + * ( This is easy to backport while we are fixing > > + * XSAVES* support. ) > > + */ > > + setup_clear_cpu_cap(X86_FEATURE_XSAVES); > > } > > FWIW, I think it would be prudent to also clear X86_FEATURE_XSAVEC. Ok, we can do that as well - but it's technically not needed to keep the kernel from generating compact format FPU saves. I'd also hope we can restore compact format handling soon-ish. > All of the issues I am aware of are related to the compact format, not 'xsaves' > itself (although 'xsaves' does *use* the compact format of course). > > The XSAVEC bit is the one that technically indicates the compact format support, > although I don't think there is any actual use of it in the kernel at present. Yeah. Thanks, Ingo