Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262195

[PATCH] x86/setup: Fix recent boot crash on 32-bit SMP machines

From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject [PATCH] x86/setup: Fix recent boot crash on 32-bit SMP machines
Date 2015-11-04 11:50 +0100
Message-ID <qr3ND-7IS-7@gated-at.bofh.it> (permalink)
References <qr3ND-7IS-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The LKP test robot reported that the bug fix in commit f5f3497cad8c
("x86/setup: Extend low identity map to cover whole kernel range")
causes CONFIG_X86_32 SMP machines to crash on boot when trying to
bring AP cpus online.

The above commit erroneously copies too many of the PGD entries to the
low memory region of 'identity_page_table', resulting in some of the
kernel mappings for PAGE_OFFSET being trashed because,

  KERNEL_PGD_PTRS > KERNEL_PGD_BOUNDARY

The maximum number of PGD entries we can copy without corrupting the
kernel mapping is KERNEL_PGD_BOUNDARY or pgd_index(PAGE_OFFSET).

Reported-by: Huang, Ying <ying.huang@intel.com>
Tested-by: Huang, Ying <ying.huang@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: <stable@vger.kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 arch/x86/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index a3cccbfc5f77..2b8cbd693da8 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1180,7 +1180,7 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	clone_pgd_range(initial_page_table,
 			swapper_pg_dir     + KERNEL_PGD_BOUNDARY,
-			KERNEL_PGD_PTRS);
+			KERNEL_PGD_BOUNDARY);
 #endif
 
 	tboot_probe();
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL] EFI urgent fix Matt Fleming <matt@codeblueprint.co.uk> - 2015-11-04 11:50 +0100
  [PATCH] x86/setup: Fix recent boot crash on 32-bit SMP machines Matt Fleming <matt@codeblueprint.co.uk> - 2015-11-04 11:50 +0100
  Re: [GIT PULL] EFI urgent fix Thomas Gleixner <tglx@linutronix.de> - 2015-11-04 12:00 +0100

csiph-web