x86/asm/entry/64: Fix MSR_IA32_SYSENTER_CS MSR value
authorBorislav Petkov <bp@suse.de>
Fri, 3 Apr 2015 09:42:10 +0000 (11:42 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 3 Apr 2015 13:29:12 +0000 (15:29 +0200)
Commit:

  d56fe4bf5f3c ("x86/asm/entry/64: Always set up SYSENTER MSRs")

missed to add "ULL" to the 0 and wrmsrl_safe() complains:

  arch/x86/kernel/cpu/common.c: In function â€˜syscall_init’:
  arch/x86/kernel/cpu/common.c:1226:2: warning: right shift count >= width of type wrmsrl_safe(MSR_IA32_SYSENTER_CS, 0);

Fix it.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/1428054130-25847-1-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/common.c

index a383d53bf0ed030b3143a000b6dc2e8d98a14fce..d56d30714d4365e98f245ec55e60c680638de3a7 100644 (file)
@@ -1184,7 +1184,7 @@ void syscall_init(void)
        wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)ia32_sysenter_target);
 #else
        wrmsrl(MSR_CSTAR, ignore_sysret);
-       wrmsrl_safe(MSR_IA32_SYSENTER_CS, 0);
+       wrmsrl_safe(MSR_IA32_SYSENTER_CS, 0ULL);
        wrmsrl_safe(MSR_IA32_SYSENTER_ESP, 0ULL);
        wrmsrl_safe(MSR_IA32_SYSENTER_EIP, 0ULL);
 #endif