Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965358AbbKDKw2 (ORCPT ); Wed, 4 Nov 2015 05:52:28 -0500 Received: from terminus.zytor.com ([198.137.202.10]:38873 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965339AbbKDKwX (ORCPT ); Wed, 4 Nov 2015 05:52:23 -0500 Date: Wed, 4 Nov 2015 02:51:46 -0800 From: tip-bot for Matt Fleming Message-ID: Cc: tglx@linutronix.de, ying.huang@linux.intel.com, mingo@kernel.org, stable@vger.kernel.org, hpa@zytor.com, luto@amacapital.net, matt@codeblueprint.co.uk, linux-kernel@vger.kernel.org, lersek@redhat.com, pbonzini@redhat.com, bp@alien8.de Reply-To: pbonzini@redhat.com, bp@alien8.de, lersek@redhat.com, linux-kernel@vger.kernel.org, matt@codeblueprint.co.uk, luto@amacapital.net, stable@vger.kernel.org, hpa@zytor.com, ying.huang@linux.intel.com, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <20151103140354.GA2653@codeblueprint.co.uk> References: <20151103140354.GA2653@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/setup: Fix recent boot crash on 32-bit SMP machines Git-Commit-ID: 1c5dac914794f0170e1582d8ffdee52d30e0e4dd X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2312 Lines: 59 Commit-ID: 1c5dac914794f0170e1582d8ffdee52d30e0e4dd Gitweb: http://git.kernel.org/tip/1c5dac914794f0170e1582d8ffdee52d30e0e4dd Author: Matt Fleming AuthorDate: Tue, 3 Nov 2015 13:40:41 +0000 Committer: Thomas Gleixner CommitDate: Wed, 4 Nov 2015 11:48:47 +0100 x86/setup: Fix recent boot crash on 32-bit SMP machines 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). Fixes: f5f3497cad8c "x86/setup: Extend low identity map to cover whole kernel range" Reported-by: Ying Huang Cc: Paolo Bonzini Cc: Laszlo Ersek Cc: lkp@01.org Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andy Lutomirski Cc: Signed-off-by: Matt Fleming Link: http://lkml.kernel.org/r/20151103140354.GA2653@codeblueprint.co.uk Signed-off-by: Thomas Gleixner --- 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 a3cccbf..2b8cbd6 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(); -- 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/