From: tip-bot for Kees Cook <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
keescook@chromium.org, pageexec@gmail.com, tglx@linutronix.de,
hpa@linux.intel.com
Subject: [tip:x86/urgent] x86: Make sure IDT is page aligned
Date: Fri, 12 Jul 2013 20:21:39 -0700 [thread overview]
Message-ID: <tip-c0b3450f101523a49823fa93d155f1d258e5ac6f@git.kernel.org> (raw)
In-Reply-To: <20130712225017.GA5366@www.outflux.net>
Commit-ID: c0b3450f101523a49823fa93d155f1d258e5ac6f
Gitweb: http://git.kernel.org/tip/c0b3450f101523a49823fa93d155f1d258e5ac6f
Author: Kees Cook <keescook@chromium.org>
AuthorDate: Fri, 12 Jul 2013 15:50:17 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 12 Jul 2013 16:14:08 -0700
x86: Make sure IDT is page aligned
Since the IDT is referenced from a fixmap, make sure it is page aligned.
Merge with 32-bit one, since it was already aligned to deal with F00F bug.
This avoids the risk of it ever being moved in the bss and having the
mapping be offset, resulting in calling incorrect handlers.
[ hpa: It isn't clear that this is a manifest bug in any way, but
tagging for -stable because it shouldn't hurt and might avoid some
very hard-to-debug breakages due to unrelated changes. ]
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/20130712225017.GA5366@www.outflux.net
Reported-by: PaX Team <pageexec@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/kernel/head_64.S | 4 ----
arch/x86/kernel/traps.c | 7 ++-----
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 5e4d8a8..317b8cc 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -514,10 +514,6 @@ ENTRY(phys_base)
.section .bss, "aw", @nobits
.align L1_CACHE_BYTES
-ENTRY(idt_table)
- .skip IDT_ENTRIES * 16
-
- .align L1_CACHE_BYTES
ENTRY(debug_idt_table)
.skip IDT_ENTRIES * 16
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index b0865e8..0952614 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -68,13 +68,10 @@
#include <asm/setup.h>
asmlinkage int system_call(void);
+#endif
-/*
- * The IDT has to be page-aligned to simplify the Pentium
- * F0 0F bug workaround.
- */
+/* The IDT has to be page-aligned to keep it aligned with its fixmap. */
gate_desc idt_table[NR_VECTORS] __page_aligned_data = { { { { 0, 0 } } }, };
-#endif
DECLARE_BITMAP(used_vectors, NR_VECTORS);
EXPORT_SYMBOL_GPL(used_vectors);
next prev parent reply other threads:[~2013-07-13 3:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-12 22:50 [PATCH v3] x86: make sure IDT is page aligned Kees Cook
2013-07-13 3:21 ` tip-bot for Kees Cook [this message]
2013-07-13 20:39 ` [tip:x86/urgent] x86: Make " Yinghai Lu
2013-07-13 21:34 ` Yinghai Lu
2013-07-15 18:09 ` H. Peter Anvin
2013-07-15 18:37 ` Kees Cook
-- strict thread matches above, loose matches on Subject: below --
2013-07-16 18:34 [PATCH v5] x86: make " Kees Cook
2013-07-16 22:33 ` [tip:x86/urgent] x86: Make " tip-bot for Kees Cook
2013-07-17 18:57 ` Yinghai Lu
2013-07-17 19:57 ` H. Peter Anvin
2013-07-18 7:05 ` Ingo Molnar
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-c0b3450f101523a49823fa93d155f1d258e5ac6f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pageexec@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).