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 <[email protected]> > Cc: Andy Lutomirski <[email protected]> > Cc: Andy Lutomirski <[email protected]> > Cc: Borislav Petkov <[email protected]> > Cc: Brian Gerst <[email protected]> > Cc: Dave Hansen <[email protected]> > Cc: Denys Vlasenko <[email protected]> > Cc: H. Peter Anvin <[email protected]> > Cc: Josh Poimboeuf <[email protected]> > Cc: Linus Torvalds <[email protected]> > Cc: Peter Zijlstra <[email protected]> > Cc: Thomas Gleixner <[email protected]> > Cc: [email protected] > Cc: [email protected] > Suggested-by: Borislav Petkov <[email protected]> > Signed-off-by: Ricardo Neri <[email protected]> > --- > 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 <[email protected]> Thx. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --

