Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932757AbbKDKri (ORCPT ); Wed, 4 Nov 2015 05:47:38 -0500 Received: from mail-wi0-f174.google.com ([209.85.212.174]:34081 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932520AbbKDKrW (ORCPT ); Wed, 4 Nov 2015 05:47:22 -0500 From: Matt Fleming To: Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Matt Fleming , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Paolo Bonzini , Laszlo Ersek , stable@vger.kernel.org, Borislav Petkov , Andy Lutomirski , "Huang, Ying" Subject: [PATCH] x86/setup: Fix recent boot crash on 32-bit SMP machines Date: Wed, 4 Nov 2015 10:47:17 +0000 Message-Id: <1446634037-10251-2-git-send-email-matt@codeblueprint.co.uk> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1446634037-10251-1-git-send-email-matt@codeblueprint.co.uk> References: <1446634037-10251-1-git-send-email-matt@codeblueprint.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1772 Lines: 50 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 Tested-by: Huang, Ying Cc: Paolo Bonzini Cc: Laszlo Ersek Cc: Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andy Lutomirski Signed-off-by: Matt Fleming --- 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/