From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757469AbdHYRlr (ORCPT ); Fri, 25 Aug 2017 13:41:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:54450 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757454AbdHYRlp (ORCPT ); Fri, 25 Aug 2017 13:41:45 -0400 Date: Fri, 25 Aug 2017 19:41:34 +0200 From: Borislav Petkov To: Ricardo Neri 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, ricardo.neri@intel.com, Andy Lutomirski , Dave Hansen , Denys Vlasenko , Josh Poimboeuf , Linus Torvalds , linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v8 02/28] x86/boot: Relocate definition of the initial state of CR0 Message-ID: <20170825174133.r5xhcv5utfipsujo@pd.tnic> References: <20170819002809.111312-1-ricardo.neri-calderon@linux.intel.com> <20170819002809.111312-3-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170819002809.111312-3-ricardo.neri-calderon@linux.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 Thx. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v8 02/28] x86/boot: Relocate definition of the initial state of CR0 Date: Fri, 25 Aug 2017 19:41:34 +0200 Message-ID: <20170825174133.r5xhcv5utfipsujo@pd.tnic> References: <20170819002809.111312-1-ricardo.neri-calderon@linux.intel.com> <20170819002809.111312-3-ricardo.neri-calderon@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mx2.suse.de ([195.135.220.15]:54450 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757454AbdHYRlp (ORCPT ); Fri, 25 Aug 2017 13:41:45 -0400 Content-Disposition: inline In-Reply-To: <20170819002809.111312-3-ricardo.neri-calderon@linux.intel.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ricardo Neri 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" , Shua 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 > 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 Thx. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id F3C526810C3 for ; Fri, 25 Aug 2017 13:41:45 -0400 (EDT) Received: by mail-wm0-f72.google.com with SMTP id i76so603251wme.2 for ; Fri, 25 Aug 2017 10:41:45 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id m13si1673667wmh.67.2017.08.25.10.41.43 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 25 Aug 2017 10:41:44 -0700 (PDT) Date: Fri, 25 Aug 2017 19:41:34 +0200 From: Borislav Petkov Subject: Re: [PATCH v8 02/28] x86/boot: Relocate definition of the initial state of CR0 Message-ID: <20170825174133.r5xhcv5utfipsujo@pd.tnic> References: <20170819002809.111312-1-ricardo.neri-calderon@linux.intel.com> <20170819002809.111312-3-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170819002809.111312-3-ricardo.neri-calderon@linux.intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: Ricardo Neri 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, ricardo.neri@intel.com, Andy Lutomirski , Dave Hansen , Denys Vlasenko , Josh Poimboeuf , Linus Torvalds , linux-arch@vger.kernel.org, linux-mm@kvack.org 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 > 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 Thx. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix ImendA?rffer, Jane Smithard, Graham Norton, HRB 21284 (AG NA 1/4 rnberg) -- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org