From: tip-bot for Lans Zhang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, lans.zhang2008@gmail.com,
hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de,
hpa@linux.intel.com
Subject: [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
Date: Fri, 1 Mar 2013 10:33:07 -0800 [thread overview]
Message-ID: <tip-2dead15fb8f6522b96c913603b5ad0b5c7d01f49@git.kernel.org> (raw)
In-Reply-To: <51300267.6000008@gmail.com>
Commit-ID: 2dead15fb8f6522b96c913603b5ad0b5c7d01f49
Gitweb: http://git.kernel.org/tip/2dead15fb8f6522b96c913603b5ad0b5c7d01f49
Author: Lans Zhang <lans.zhang2008@gmail.com>
AuthorDate: Fri, 1 Mar 2013 09:20:39 +0800
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 1 Mar 2013 10:18:33 -0800
x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
In startup_32, the running code still uses the initial GDT
located in setup. Thus, __BOOT_DS is preferred. Currently
__KERNEL_DS is lucky to equal to __BOOT_DS, but this is
not always a safe way.
Signed-off-by: Lans Zhang <lans.zhang2008@gmail.com>
Link: http://lkml.kernel.org/r/51300267.6000008@gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/boot/compressed/head_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index c1d383d..16f24e6 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -52,7 +52,7 @@ ENTRY(startup_32)
jnz 1f
cli
- movl $(__KERNEL_DS), %eax
+ movl $(__BOOT_DS), %eax
movl %eax, %ds
movl %eax, %es
movl %eax, %ss
prev parent reply other threads:[~2013-03-01 18:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51300267.6000008@gmail.com>
2013-03-01 5:23 ` tip-bot for gmail
2013-03-01 17:47 ` Yinghai Lu
2013-03-01 18:17 ` H. Peter Anvin
2013-03-01 18:33 ` tip-bot for Lans Zhang [this message]
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=tip-2dead15fb8f6522b96c913603b5ad0b5c7d01f49@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=lans.zhang2008@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome