summaryrefslogtreecommitdiff
path: root/lib/crc32defs.h
diff options
context:
space:
mode:
authorLianbo Jiang <lijiang@redhat.com>2020-08-04 07:49:32 +0300
committerIngo Molnar <mingo@kernel.org>2020-08-07 02:32:00 +0300
commita2e9a95d2190ef55bf0724ecdf8a466d393a86b6 (patch)
tree2094302f9d06d9daa477836efc47fbe4e2efe360 /lib/crc32defs.h
parenta3e1c3bb24e2ff2927af5e30c2bebe669bb84196 (diff)
downloadlinux-a2e9a95d2190ef55bf0724ecdf8a466d393a86b6.tar.xz
kexec: Improve & fix crash_exclude_mem_range() to handle overlapping ranges
The crash_exclude_mem_range() function can only handle one memory region a time. It will fail in the case in which the passed in area covers several memory regions. In this case, it will only exclude the first region, then return, but leave the later regions unsolved. E.g in a NEC system with two usable RAM regions inside the low 1M: ... BIOS-e820: [mem 0x0000000000000000-0x000000000003efff] usable BIOS-e820: [mem 0x000000000003f000-0x000000000003ffff] reserved BIOS-e820: [mem 0x0000000000040000-0x000000000009ffff] usable It will only exclude the memory region [0, 0x3efff], the memory region [0x40000, 0x9ffff] will still be added into /proc/vmcore, which may cause the following failure when dumping vmcore: ioremap on RAM at 0x0000000000040000 - 0x0000000000040fff WARNING: CPU: 0 PID: 665 at arch/x86/mm/ioremap.c:186 __ioremap_caller+0x2c7/0x2e0 ... RIP: 0010:__ioremap_caller+0x2c7/0x2e0 ... cp: error reading '/proc/vmcore': Cannot allocate memory kdump: saving vmcore failed In order to fix this bug, let's extend the crash_exclude_mem_range() to handle the overlapping ranges. [ mingo: Amended the changelog. ] Signed-off-by: Lianbo Jiang <lijiang@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Dave Young <dyoung@redhat.com> Link: https://lore.kernel.org/r/20200804044933.1973-3-lijiang@redhat.com
Diffstat (limited to 'lib/crc32defs.h')
0 files changed, 0 insertions, 0 deletions