Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753824AbcKJDYr (ORCPT ); Wed, 9 Nov 2016 22:24:47 -0500 Received: from mga05.intel.com ([192.55.52.43]:43363 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563AbcKJDYq (ORCPT ); Wed, 9 Nov 2016 22:24:46 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,616,1473145200"; d="scan'208";a="29497781" Message-ID: <1478748283.2551.5.camel@ranerica-desktop> Subject: Re: [PATCH 1/4] x86/cpufeature: Add User-Mode Instruction Prevention definitions From: Ricardo Neri To: Andy Lutomirski Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , X86 ML , "linux-doc@vger.kernel.org" , Andy Lutomirski , Andrew Morton , Borislav Petkov , Brian Gerst , Chen Yucong , Chris Metcalf , Dave Hansen , Fenghua Yu , Huang Rui , Jiri Slaby , Jonathan Corbet , "Michael S . Tsirkin" , Paul Gortmaker , Peter Zijlstra , "Ravi V . Shankar" , Shuah Khan , Vlastimil Babka Date: Wed, 09 Nov 2016 19:24:43 -0800 In-Reply-To: References: <1478585533-19406-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1478585533-19406-2-git-send-email-ricardo.neri-calderon@linux.intel.com> <1478665516.2533.2.camel@ranerica-desktop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1365 Lines: 40 On Wed, 2016-11-09 at 03:02 -0800, Andy Lutomirski wrote: > On Tue, Nov 8, 2016 at 8:25 PM, Ricardo Neri > wrote: > > On Tue, 2016-11-08 at 07:32 -0800, Andy Lutomirski wrote: > >> > diff --git a/arch/x86/include/asm/disabled-features.h > >> b/arch/x86/include/asm/disabled-features.h > >> > index 85599ad..4707445 100644 > >> > --- a/arch/x86/include/asm/disabled-features.h > >> > +++ b/arch/x86/include/asm/disabled-features.h > >> > @@ -16,6 +16,12 @@ > >> > # define DISABLE_MPX (1<<(X86_FEATURE_MPX & 31)) > >> > #endif > >> > > >> > +#ifdef CONFIG_X86_INTEL_UMIP > >> > >> ^^^^^ > >> > >> What's this? > >> > >> Let's try to do this with a minimum of configuration. > > > > My intention here is put in this file all the #if build configurations > > so that I don't have to put them other files by using functions such as > > cpu_feature_enable. Isn't this the intention of this file? > > What I mean is: why does this need a config option at all? I intended this feature to be configurable at build time in case someone wants to build a kernel without it; similar to other features such as SMAP. Is this not needed? Should Linux be built with this feature always enabled? This feature could always be disabled via a kernel parameter, though; even if Linux is built with it. Thanks and BR, Ricardo > > --Andy