diff options
author | Kees Cook <keescook@chromium.org> | 2013-07-15 14:50:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-04 04:50:53 -0400 |
commit | 943741e352f8b0c524f542b93e8b62978dc0a9b0 (patch) | |
tree | 23c4c741d4d2c4a65167c1f98be8faf9a1ad40b4 /arch/x86 | |
parent | 6d7d28443969512be95873d2fb155f4be9261ca5 (diff) |
x86: make sure IDT is page aligned
based on 4df05f361937ee86e5a8c9ead8aeb6a19ea9b7d7 upstream.
Since the IDT is referenced from a fixmap, make sure it is page aligned.
This avoids the risk of the IDT ever being moved in the bss and having
the mapping be offset, resulting in calling incorrect handlers. In the
current upstream kernel this is not a manifested bug, but heavily patched
kernels (such as those using the PaX patch series) did encounter this bug.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reported-by: PaX Team <pageexec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/head_64.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 321d65ebaffe..a8368608ab41 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -513,7 +513,7 @@ ENTRY(phys_base) | |||
513 | #include "../../x86/xen/xen-head.S" | 513 | #include "../../x86/xen/xen-head.S" |
514 | 514 | ||
515 | .section .bss, "aw", @nobits | 515 | .section .bss, "aw", @nobits |
516 | .align L1_CACHE_BYTES | 516 | .align PAGE_SIZE |
517 | ENTRY(idt_table) | 517 | ENTRY(idt_table) |
518 | .skip IDT_ENTRIES * 16 | 518 | .skip IDT_ENTRIES * 16 |
519 | 519 | ||