⬢ DragonFlyBSD Kernel Audit
DF-2214 / kldload_panic_iteration.txt
← back to finding ↓ download raw
# Iteration 1 note (toolchain, NOT the finding): first kldload attempt
# panicked the guest BEFORE the module executed a single instruction:
#
#   panic: lost base for relatab
#   cpuid = 2
#   Trace beginning at frame 0xfffff8011885f688
#   link_elf_obj_reloc_local() at link_elf_obj_reloc_local+0x28f
#   link_elf_obj_load_file() at link_elf_obj_load_file+0xb6f
#   linker_load_file() ...
#   sys_kldload() at sys_kldload+0xc6
#
# Cause: the rig object was compiled WITHOUT sys/platform/pc64/conf/kern.mk
# flags; gcc 8.3 emitted .eh_frame relocations that the DFly link_elf_obj
# loader cannot base. Fixed by adding -fno-asynchronous-unwind-tables
# -mcmodel=kernel -mno-red-zone -msoft-float (see build.sh). Guest was reset
# (vm.sh reset with-src) and the fixed build reproduced cleanly 3x.