diff options
| author | Greg Thelen <gthelen@google.com> | 2026-10-22 22:45:18 -0700 |
|---|---|---|
| committer | Pasha Tatashin <pasha.tatashin@soleen.com> | 2026-11-08 11:20:19 -0500 |
| commit | 58c5852ca96c58cdfdb9646870b217fc54d06a97 (patch) | |
| tree | e78b438f79a62a60f49a97bbfe93db447a1fddac /rust/kernel/alloc/allocator | |
| parent | cc448e44f6e9fc83f1527f926f52ebfa5a3d1ce9 (diff) | |
kho: check fdt_phys in is_kho_boot()
is_kho_boot() is called early in boot before the linear memory map is
initialized, so calling phys_to_virt() via kho_get_fdt() there is
invalid.
On arm64 (and similarly in upcoming riscv64 support), this triggers
BUG_ONs in debug builds, such as:
kernel BUG at ./arch/arm64/include/asm/memory.h:377!
Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
Call trace:
is_kho_boot+0x2c/0x38 (P)
efi_init+0x94/0xf8
setup_arch+0xf0/0x240
start_kernel+0x84/0x490
__primary_switched+0x88/0x98
Use kho_in.fdt_phys in is_kho_boot() directly instead of translating it
to a virtual address.
Fixes: d6d511639185 ("kexec: introduce is_kho_boot()")
Signed-off-by: Greg Thelen <gthelen@google.com>
Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Link: https://patch.msgid.link/20261023054518.3258350-1-gthelen@google.com
[Pasha: massaged the changelog]
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
