From: Lianbo Jiang <lijiang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: kexec@lists.infradead.org, tglx@linutronix.de, bp@alien8.de,
mingo@redhat.com, x86@kernel.org, hpa@zytor.com,
dyoung@redhat.com, bhe@redhat.com, k-hagio@ab.jp.nec.com
Subject: [PATCH 1/3] x86/crash: Correct the address boundary of function parameters
Date: Tue, 4 Aug 2020 12:49:31 +0800 [thread overview]
Message-ID: <20200804044933.1973-2-lijiang@redhat.com> (raw)
In-Reply-To: <20200804044933.1973-1-lijiang@redhat.com>
Let's carefully handle the boundary of the function parameter to make
sure that the arguments passed doesn't exceed the address range.
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
---
arch/x86/kernel/crash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index fd87b59452a3..a8f3af257e26 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -230,7 +230,7 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
int ret = 0;
/* Exclude the low 1M because it is always reserved */
- ret = crash_exclude_mem_range(cmem, 0, 1<<20);
+ ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1);
if (ret)
return ret;
--
2.17.1
next prev parent reply other threads:[~2020-08-04 4:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 4:49 [PATCH 0/3] x86/kexec_file: Fix some corners bugs and improve the crash_exclude_mem_range() Lianbo Jiang
2020-08-04 4:49 ` Lianbo Jiang [this message]
2020-08-06 17:10 ` [tip: x86/urgent] x86/crash: Correct the address boundary of function parameters tip-bot2 for Lianbo Jiang
2020-08-06 23:38 ` tip-bot2 for Lianbo Jiang
2020-08-04 4:49 ` [PATCH 2/3] kexec: Improve the crash_exclude_mem_range() to handle the overlapping ranges Lianbo Jiang
2020-08-06 17:10 ` [tip: x86/urgent] kexec: Improve & fix crash_exclude_mem_range() to handle " tip-bot2 for Lianbo Jiang
2020-08-06 23:38 ` tip-bot2 for Lianbo Jiang
2020-08-04 4:49 ` [PATCH 3/3] kexec_file: correctly output debugging information for the PT_LOAD elf header Lianbo Jiang
2020-08-06 17:10 ` [tip: x86/urgent] kexec_file: Correctly output debugging information for the PT_LOAD ELF header tip-bot2 for Lianbo Jiang
2020-08-06 23:38 ` tip-bot2 for Lianbo Jiang
2020-08-05 6:36 ` [PATCH 0/3] x86/kexec_file: Fix some corners bugs and improve the crash_exclude_mem_range() Dave Young
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=20200804044933.1973-2-lijiang@redhat.com \
--to=lijiang@redhat.com \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=dyoung@redhat.com \
--cc=hpa@zytor.com \
--cc=k-hagio@ab.jp.nec.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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