Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arm64: implement switchable PTOV()/VTOP() for kernels >= 5.10
Crash encounters a bug like the following: ... SECTION_SIZE_BITS: 30 CONFIG_ARM64_VA_BITS: 52 VA_BITS_ACTUAL: 48 (calculated) VA_BITS: 48 PAGE_OFFSET: ffff000000000000 VA_START: ffff800000000000 modules: ffff800008000000 - ffff80000fffffff vmalloc: ffff800010000000 - ffffffdfdffeffff kernel image: ffff800010000000 - ffff800012750000 vmemmap: ffffffdfffe00000 - ffffffffffffffff <readmem: ffff800011c53bc8, KVADDR, "nr_irqs", 4, (FOE), b47bdc> <read_kdump: addr: ffff800011c53bc8 paddr: eb453bc8 cnt: 4> read_netdump: addr: ffff800011c53bc8 paddr: eb453bc8 cnt: 4 offset: 1c73bc8 irq_stack_ptr: type: 1, TYPE_CODE_PTR target_typecode: 8, TYPE_CODE_INT target_length: 8 length: 8 GNU_GET_DATATYPE[thread_union]: returned via gdb_error_hook <readmem: ffff000b779c0050, KVADDR, "IRQ stack pointer", 8, (ROE), 3a37bea0> <read_kdump: addr: ffff000b779c0050 paddr: fff1000bf79c0050 cnt: 8> read_netdump: READ_ERROR: offset not found for paddr: fff1000bf79c0050 crash: read error: kernel virtual address: ffff000b779c0050 type: "IRQ stack pointer" ... Apparently, for a normal system, the 'paddr: fff1000bf79c0050' is unreasonable. This bug connects with kernel commit 7bc1a0f9e176 ("arm64: mm: use single quantity to represent the PA to VA translation"), which removed physvirt_offset kernel variable and changed the PTOV()/VTOP() formulas. Implement switchable PTOV()/VTOP() to cope with different kernel version. Signed-off-by: Pingfan Liu <piliu@redhat.com>
- Loading branch information