Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750928AbdHaEEW (ORCPT ); Thu, 31 Aug 2017 00:04:22 -0400 Received: from mga09.intel.com ([134.134.136.24]:56867 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbdHaEEU (ORCPT ); Thu, 31 Aug 2017 00:04:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,451,1498546800"; d="scan'208";a="306400755" Message-ID: <1504152258.51857.8.camel@ranerica-desktop> Subject: Re: [PATCH v8 02/28] x86/boot: Relocate definition of the initial state of CR0 From: Ricardo Neri To: Borislav Petkov Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Andrew Morton , Brian Gerst , Chris Metcalf , Dave Hansen , Paolo Bonzini , Liang Z Li , Masami Hiramatsu , Huang Rui , Jiri Slaby , Jonathan Corbet , "Michael S. Tsirkin" , Paul Gortmaker , Vlastimil Babka , Chen Yucong , "Ravi V. Shankar" , Shuah Khan , linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Dave Hansen , Denys Vlasenko , Josh Poimboeuf , Linus Torvalds , linux-arch@vger.kernel.org, linux-mm@kvack.org Date: Wed, 30 Aug 2017 21:04:18 -0700 In-Reply-To: <20170825174133.r5xhcv5utfipsujo@pd.tnic> References: <20170819002809.111312-1-ricardo.neri-calderon@linux.intel.com> <20170819002809.111312-3-ricardo.neri-calderon@linux.intel.com> <20170825174133.r5xhcv5utfipsujo@pd.tnic> 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: 2348 Lines: 64 On Fri, 2017-08-25 at 19:41 +0200, Borislav Petkov wrote: Thanks Borislav for your feedback! > On Fri, Aug 18, 2017 at 05:27:43PM -0700, Ricardo Neri wrote: > > Both head_32.S and head_64.S utilize the same value to initialize the > > control register CR0. Also, other parts of the kernel might want to access > > to this initial definition (e.g., emulation code for User-Mode Instruction > > s/to // > > > Prevention uses this state to provide a sane dummy value for CR0 when I'll make this change. > > emulating the smsw instruction). Thus, relocate this definition to a > > header file from which it can be conveniently accessed. > > > > Cc: Andrew Morton > > Cc: Andy Lutomirski > > Cc: Andy Lutomirski > > Cc: Borislav Petkov > > Cc: Brian Gerst > > Cc: Dave Hansen > > Cc: Denys Vlasenko > > Cc: H. Peter Anvin > > Cc: Josh Poimboeuf > > Cc: Linus Torvalds > > Cc: Peter Zijlstra > > Cc: Thomas Gleixner > > Cc: linux-arch@vger.kernel.org > > Cc: linux-mm@kvack.org > > Suggested-by: Borislav Petkov > > Signed-off-by: Ricardo Neri > > --- > > arch/x86/include/uapi/asm/processor-flags.h | 6 ++++++ > > arch/x86/kernel/head_32.S | 3 --- > > arch/x86/kernel/head_64.S | 3 --- > > 3 files changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/arch/x86/include/uapi/asm/processor-flags.h b/arch/x86/include/uapi/asm/processor-flags.h > > index 185f3d10c194..aae1f2aa7563 100644 > > --- a/arch/x86/include/uapi/asm/processor-flags.h > > +++ b/arch/x86/include/uapi/asm/processor-flags.h > > @@ -151,5 +151,11 @@ > > #define CX86_ARR_BASE 0xc4 > > #define CX86_RCR_BASE 0xdc > > > > +/* > > + * Initial state of CR0 for head_32/64.S > > + */ > > No need for that comment. > > With the minor nitpicks addressed, you can add: > > Reviewed-by: Borislav Petkov Thank you! Is it necessary for me to submit a v9 with these updates? Perhaps I can make these updates in branch for the maintainers to pull when/if this series is ack'ed. Thanks and BR, Ricardo