⬢ DragonFlyBSD Kernel Audit
DF-5475 / build.log
← back to finding ↓ download raw
DF-5475 fix-validation build (kernel with fix.diff applied), DragonFly guest.

Note: the guest was reset to the clean snapshot after validation completed,
so this file preserves the decisive excerpts captured live during the run
(full 5.4 MB /usr/src build log existed in the guest at /root/df5475_build.log).

[1] fix applied to guest /usr/src (from the read-only audit tree's fix.diff):
    $ cd /usr/src && patch -p1 < /root/df5475_fix.diff
    Patching file sys/cpu/x86_64/misc/x86_64-gdbstub.c using Plan A...
    Hunk #1 succeeded at 475.
    done
    479:   * DF-5475: If no gdb console was ever attached (gdb_tab == NULL) we
    487:  if (gdb_tab == NULL)

[2] build (note: "buildkernel" refused without buildworld -> used nativekernel,
    which is the documented rushed-path target; full pre-existing obj tree
    /usr/obj/usr/src/sys (1.1G) made this an incremental build):
    make nativekernel KERNCONF=X86_64_GENERIC && make installkernel KERNCONF=X86_64_GENERIC

[3] the stub recompiled with -Werror (build.log line 8301):
    cc -c -O2 -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
    -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wold-style-definition
    -Wmissing-include-dirs -Wno-pointer-sign -init-self -Wundef
    -Wno-unused-but-set-variable -std=gnu11 -g -nostdinc -I. -Iinclude
    -I/usr/src/sys -I/usr/obj/usr/src/sys/X86_64_GENERIC
    -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h ... -Werror
    /usr/src/sys/cpu/x86_64/misc/x86_64-gdbstub.c

[4] build+install completed (line 17087):
    BUILD_INSTALL_OK
    -r-xr-xr-x 1 root wheel 119340864 Oct  6 03:32 /boot/kernel/kernel

[5] guard verified present in the installed kernel binary
    (first instruction of gdb_handle_exception):
    ffffffff80b94240 <gdb_handle_exception>:
    ffffffff80b94240: cmpq $0x0,0x789ad8(%rip)  # ffffffff8131dd20 <gdb_tab>
    ffffffff80b94248: je   ffffffff80b94cb0 <gdb_handle_exception+0xa70>   <- early return
    (putpacket.constprop.2 unchanged at ffffffff80b94080 — now unreachable with gdb_tab==NULL)

[6] reboot into patched kernel:
    DragonFly 6.5-DEVELOPMENT #1: Tue Oct  6 03:20:15 UTC 2026
      root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64