From: tip-bot for Matt Fleming <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:x86/urgent] x86/setup: Fix recent boot crash on 32-bit SMP machines
Date: Wed, 4 Nov 2015 02:51:46 -0800 [thread overview]
Message-ID: <tip-1c5dac914794f0170e1582d8ffdee52d30e0e4dd@git.kernel.org> (raw)
In-Reply-To: <20151103140354.GA2653@codeblueprint.co.uk>
Commit-ID: 1c5dac914794f0170e1582d8ffdee52d30e0e4dd
Gitweb: http://git.kernel.org/tip/1c5dac914794f0170e1582d8ffdee52d30e0e4dd
Author: Matt Fleming <matt@codeblueprint.co.uk>
AuthorDate: Tue, 3 Nov 2015 13:40:41 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
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 <ying.huang@linux.intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: lkp@01.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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Link: http://lkml.kernel.org/r/20151103140354.GA2653@codeblueprint.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
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();
prev parent reply other threads:[~2015-11-04 10:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 5:41 [lkp] [x86/setup] f5f3497cad: BUG: kernel boot crashed kernel test robot
2015-11-02 16:28 ` Matt Fleming
2015-11-03 8:07 ` Ingo Molnar
2015-11-03 14:06 ` Matt Fleming
2015-11-04 10:51 ` tip-bot for Matt Fleming [this message]
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-1c5dac914794f0170e1582d8ffdee52d30e0e4dd@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=lersek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=ying.huang@linux.intel.com \
/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