From: Lianbo Jiang Date: Tue, 4 Aug 2020 04:49:31 +0000 (+0800) Subject: x86/crash: Correct the address boundary of function parameters X-Git-Tag: v5.9-rc1~7^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3e1c3bb24e2ff2927af5e30c2bebe669bb84196;p=thirdparty%2Flinux.git x86/crash: Correct the address boundary of function parameters 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 Signed-off-by: Ingo Molnar Acked-by: Dave Young Link: https://lore.kernel.org/r/20200804044933.1973-2-lijiang@redhat.com --- diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index fd87b59452a3e..a8f3af257e26c 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;