Return-Path: Received: from mga03.intel.com ([134.134.136.65]:9373 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753652AbcFTVaG (ORCPT ); Mon, 20 Jun 2016 17:30:06 -0400 Subject: [PATCH 1/7] x86: fix duplicated X86_BUG(9) macro To: andi.kleen@intel.com Cc: Dave Hansen , dave.hansen@linux.intel.com, luto@kernel.org, stable@vger.kernel.org From: Dave Hansen Date: Mon, 20 Jun 2016 14:28:45 -0700 References: <20160620212844.725B8F60@viggo.jf.intel.com> In-Reply-To: <20160620212844.725B8F60@viggo.jf.intel.com> Message-Id: <20160620212845.A6E477F2@viggo.jf.intel.com> Sender: stable-owner@vger.kernel.org List-ID: Fix typo in subject. -- From: Dave Hansen cpufeatures.h currently defines X86_BUG(9) twice on 32-bit: #define X86_BUG_NULL_SEG X86_BUG(9) /* Nulling a selector preserves the base */ ... #ifdef CONFIG_X86_32 #define X86_BUG_ESPFIX X86_BUG(9) /* "" IRET to 16-bit SS corrupts ESP/RSP high bits */ #endif I think what happened was that this added the X86_BUG_ESPFIX, but in an #ifdef below most of the bugs: [58a5aac5] x86/entry/32: Introduce and use X86_BUG_ESPFIX instead of paravirt_enabled Then this came along and added X86_BUG_NULL_SEG, but collided with the earlier one that did the bug below the main block defining all the X86_BUG()s. [7a5d6704] x86/cpu: Probe the behavior of nulling out a segment at boot time Signed-off-by: Dave Hansen Acked-by: Andy Lutomirski Cc: stable@vger.kernel.org --- b/arch/x86/include/asm/cpufeatures.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff -puN arch/x86/include/asm/cpufeatures.h~fix-x86-bugs-macros arch/x86/include/asm/cpufeatures.h --- a/arch/x86/include/asm/cpufeatures.h~fix-x86-bugs-macros 2016-06-20 14:20:36.324836252 -0700 +++ b/arch/x86/include/asm/cpufeatures.h 2016-06-20 14:20:36.328836433 -0700 @@ -301,10 +301,6 @@ #define X86_BUG_FXSAVE_LEAK X86_BUG(6) /* FXSAVE leaks FOP/FIP/FOP */ #define X86_BUG_CLFLUSH_MONITOR X86_BUG(7) /* AAI65, CLFLUSH required before MONITOR */ #define X86_BUG_SYSRET_SS_ATTRS X86_BUG(8) /* SYSRET doesn't fix up SS attrs */ -#define X86_BUG_NULL_SEG X86_BUG(9) /* Nulling a selector preserves the base */ -#define X86_BUG_SWAPGS_FENCE X86_BUG(10) /* SWAPGS without input dep on GS */ - - #ifdef CONFIG_X86_32 /* * 64-bit kernels don't use X86_BUG_ESPFIX. Make the define conditional @@ -312,5 +308,7 @@ */ #define X86_BUG_ESPFIX X86_BUG(9) /* "" IRET to 16-bit SS corrupts ESP/RSP high bits */ #endif +#define X86_BUG_NULL_SEG X86_BUG(10) /* Nulling a selector preserves the base */ +#define X86_BUG_SWAPGS_FENCE X86_BUG(11) /* SWAPGS without input dep on GS */ #endif /* _ASM_X86_CPUFEATURES_H */ _