mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@kernel.org>
To: X86 ML <x86@kernel.org>, linux-kernel@vger.kernel.org
Cc: Brian Gerst <brgerst@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>, Willy Tarreau <w@1wt.eu>,
	Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andy Lutomirski <luto@kernel.org>
Subject: [PATCH v2] x86/entry/32: Remove duplicate initialization of tss.ss1
Date: Thu, 23 Jul 2015 12:14:41 -0700	[thread overview]
Message-ID: <ffbf0c66b0ff54c15459b5e0c5d61334be7fdbec.1437678823.git.luto@kernel.org> (raw)
In-Reply-To: <690f0c629a1085d054e2d1ef3da073cfb3f7db92.1437678821.git.luto@kernel.org>

It's statically initialized, so we don't need to dynamically
initialize it too.

Reported-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---

Changes since v1: Delete the code :)

arch/x86/kernel/cpu/common.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index e2ed2513a51e..e08eee98a5f8 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1005,14 +1005,6 @@ void enable_sep_cpu(void)
 	if (IS_ENABLED(CONFIG_X86_32) && !boot_cpu_has(X86_FEATURE_SEP))
 		goto out;
 
-#ifdef CONFIG_X86_32
-	/*
-	 * We cache MSR_IA32_SYSENTER_CS's value in the TSS's ss1 field --
-	 * see the big comment in struct x86_hw_tss's definition.
-	 */
-	tss->x86_tss.ss1 = __KERNEL_CS;
-#endif
-
 	wrmsrl_safe(MSR_IA32_SYSENTER_CS, __KERNEL_CS);
 	wrmsrl_safe(MSR_IA32_SYSENTER_ESP,
 		    (unsigned long)tss +
-- 
2.4.3


  reply	other threads:[~2015-07-23 19:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 19:14 [PATCH v2] x86/asm/msr: Make wrmsrl() a function Andy Lutomirski
2015-07-23 19:14 ` Andy Lutomirski [this message]
2015-08-23 11:26   ` [PATCH v2] x86/entry/32: Remove duplicate initialization of tss.ss1 Ingo Molnar
2015-08-23 15:43     ` Andy Lutomirski
2015-08-24  6:48       ` Ingo Molnar
2015-08-23 11:45 ` [tip:x86/asm] x86/asm/msr: Make wrmsrl() a function tip-bot for Andy Lutomirski
2015-08-23 19:23   ` H. Peter Anvin
2015-08-24 18:11     ` Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ffbf0c66b0ff54c15459b5e0c5d61334be7fdbec.1437678823.git.luto@kernel.org \
    --to=luto@kernel.org \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=w@1wt.eu \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®