From: tip-bot for Jiri Bohac <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ebiederm@xmission.com, torvalds@linux-foundation.org,
peterz@infradead.org, yinghai@kernel.org, jbohac@suse.cz,
mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
keescook@chromium.org, tglx@linutronix.de
Subject: [tip:x86/boot] x86/debug: Extend the lower bound of crash kernel low reservations
Date: Thu, 22 Jun 2017 04:10:03 -0700 [thread overview]
Message-ID: <tip-fe2d48b805d01e14ddb8144de01de43171eb516f@git.kernel.org> (raw)
In-Reply-To: <20170616161602.2r7birrf2y3ylv6v@dwarf.suse.cz>
Commit-ID: fe2d48b805d01e14ddb8144de01de43171eb516f
Gitweb: http://git.kernel.org/tip/fe2d48b805d01e14ddb8144de01de43171eb516f
Author: Jiri Bohac <jbohac@suse.cz>
AuthorDate: Fri, 16 Jun 2017 18:16:02 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 22 Jun 2017 11:10:23 +0200
x86/debug: Extend the lower bound of crash kernel low reservations
The following change in 2013:
0212f9159694 ("x86: Add Crash kernel low reservation")
... introduced reserve_crashkernel_low(). This function is used to
reserve crash kernel memory either if crashkernel=size,low is given
on the command line or if the region reserved by reserve_crashkernel
is entirely above 4G.
reserve_crashkernel_low() tries to find a block of 'low_size' bytes.
But there seems to be no good reason to restrict the lower bound
of the range to 'low_size'.
Make memblock_find_in_range() search from the start of memory.
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/20170616161602.2r7birrf2y3ylv6v@dwarf.suse.cz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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 0b4d3c6..848d048 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -503,7 +503,7 @@ static int __init reserve_crashkernel_low(void)
return 0;
}
- low_base = memblock_find_in_range(low_size, 1ULL << 32, low_size, CRASH_ALIGN);
+ low_base = memblock_find_in_range(0, 1ULL << 32, low_size, CRASH_ALIGN);
if (!low_base) {
pr_err("Cannot reserve %ldMB crashkernel low memory, please try smaller size.\n",
(unsigned long)(low_size >> 20));
prev parent reply other threads:[~2017-06-22 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 16:16 [PATCH] x86: fix lower bound of crash kernel low reservation Jiri Bohac
2017-06-22 11:10 ` tip-bot for Jiri Bohac [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-fe2d48b805d01e14ddb8144de01de43171eb516f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jbohac@suse.cz \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).