Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966279AbcKKEIO (ORCPT ); Thu, 10 Nov 2016 23:08:14 -0500 Received: from mga03.intel.com ([134.134.136.65]:9964 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965625AbcKKEIM (ORCPT ); Thu, 10 Nov 2016 23:08:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,620,1473145200"; d="scan'208";a="1083743176" Message-ID: <1478837287.2542.4.camel@ranerica-desktop> Subject: Re: [PATCH 1/4] x86/cpufeature: Add User-Mode Instruction Prevention definitions From: Ricardo Neri To: Borislav Petkov Cc: Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , X86 ML , "linux-doc@vger.kernel.org" , Andy Lutomirski , Andrew Morton , 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: Thu, 10 Nov 2016 20:08:07 -0800 In-Reply-To: <20161110085833.zw6qgd7pshbni656@pd.tnic> 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> <1478748283.2551.5.camel@ranerica-desktop> <20161110085833.zw6qgd7pshbni656@pd.tnic> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1275 Lines: 31 On Thu, 2016-11-10 at 09:58 +0100, Borislav Petkov wrote: > On Wed, Nov 09, 2016 at 07:24:43PM -0800, Ricardo Neri wrote: > > 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. > > It probably is a good idea to have it build-time configurable for the > embedded folks. But you can do a before and after build and look at > the vmlinux size and see how much it has grown. If it is only a couple > of KBs I guess we can drop the config option even but I know there are > people who still care about KBs too... Thanks for the suggestions. Perhaps I can include these metrics in my V2. On th other hand, Dave Hansen gave a good argument on potential conflicts when, of instance running on an AMD CPU. UMIP is enabled by setting a bit in CR4. If that bit is not supposed to be set, that could cause a #GP fault. Thanks and BR, Ricardo > > -- > Regards/Gruss, > Boris. > > SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)