Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755814AbbEEXEu (ORCPT ); Tue, 5 May 2015 19:04:50 -0400 Received: from mga01.intel.com ([192.55.52.88]:48183 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750698AbbEEXEr (ORCPT ); Tue, 5 May 2015 19:04:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,376,1427785200"; d="scan'208";a="724286158" From: "Yu, Fenghua" To: Ingo Molnar , "linux-kernel@vger.kernel.org" CC: Andy Lutomirski , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: RE: [PATCH 200/208] x86/fpu/xstate: Don't assume the first zero xfeatures zero bit means the end Thread-Topic: [PATCH 200/208] x86/fpu/xstate: Don't assume the first zero xfeatures zero bit means the end Thread-Index: AQHQh11QcWKYQLvmX0CA+qW9D1RMzp1uAJtA Date: Tue, 5 May 2015 23:04:41 +0000 Message-ID: <3E5A0FA7E9CA944F9D5414FEC6C712205C8D629F@ORSMSX106.amr.corp.intel.com> References: <1430848712-28064-1-git-send-email-mingo@kernel.org> <1430848712-28064-40-git-send-email-mingo@kernel.org> In-Reply-To: <1430848712-28064-40-git-send-email-mingo@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t45N4spQ008427 Content-Length: 1048 Lines: 23 > From: Ingo Molnar [mailto:mingo.kernel.org@gmail.com] On Behalf Of Ingo > Molnar > Sent: Tuesday, May 05, 2015 10:58 AM > To: linux-kernel@vger.kernel.org > Cc: Andy Lutomirski; Borislav Petkov; Dave Hansen; Yu, Fenghua; H. Peter > Anvin; Linus Torvalds; Oleg Nesterov; Thomas Gleixner > Subject: [PATCH 200/208] x86/fpu/xstate: Don't assume the first zero > xfeatures zero bit means the end > > The current xstate code in setup_xstate_features() assumes that the first > zero bit means the end of xfeatures - but that is not so, the SDM clearly > states that an arbitrary set of xfeatures might be enabled - and it is also clear > from the description of the compaction feature that holes are possible: A previous patch in lkml has (exactly) the same fix: http://lists-archives.com/linux-kernel/28292115-x86-xsave-c-fix-xstate-offsets-and-sizes-enumeration.html Thanks. -Fenghua ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?