arm64: kdump: Properly handle the 4G boundary
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5P8OD CVE: NA ------------------------------------------------------------------------- The value of 'end' for both for_each_mem_range() and __map_memblock() is 'start + size', not 'start + size - 1'. So if the end value of a memory block is 4G, then: if (eflags && (end >= SZ_4G)) { //end=SZ_4G if (start < SZ_4G) { ... ... start = SZ_4G; } } //Now, start=end=SZ_4G, all [start,...) will be mapped __map_memblock(pgdp, start, end, ..xxx..); Fixes: e26eee76 ("arm64: kdump: Don't force page-level mappings for memory above 4G") Signed-off-by:Zhen Lei <thunder.leizhen@huawei.com> Reviewed-by:
Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Please register or sign in to comment