DragonFlyBSD Kernel Audit
DF-2626 / fix_build.log
← back to finding ↓ download raw
fix_build.log (DF-2626) — kernel rebuild with fix.diff applied
===============================================================

HONESTY NOTE: the in-guest build log (/root/fix_build.log) was destroyed by
the final `vm.sh reset with-src` (disk snapshot revert) before it could be
fetched. What follows are the VERBATIM lines captured live while polling the
build (three polls, 90 s apart), which show: (a) hammer2_vnops.c recompiled
clean with -Werror, (b) modules installed, (c) BUILD_INSTALL_OK, (d) new
kernel binary in /boot/kernel.

Commands executed on guest (as root):

  $ echo <b64 fix.diff> | b64decode -r > /root/df2626.fix.diff
  $ cd /usr/src && patch -N -p1 < /root/df2626.fix.diff
    Patching file sys/vfs/hammer2/hammer2_vnops.c using Plan A...
    Hunk #1 succeeded at 980.  (done)
  $ grep -n -A3 'error = uiomovebp' sys/vfs/hammer2/hammer2_vnops.c
    983:		error = uiomovebp(bp, bp->b_data + loff, n, uio);
    984-		bqrelse(bp);
    985-		if (error)
    986-			break;
    (the write path at :1144 already checked the error — only the read loop was broken)
  $ cd /usr/src && nohup sh -c "make -j6 nativekernel KERNCONF=X86_64_GENERIC \
      && make installkernel KERNCONF=X86_64_GENERIC && echo BUILD_INSTALL_OK" \
      > /root/fix_build.log 2>&1 < /dev/null &

Poll captures (verbatim excerpts):

  [poll 2] cc -c -O2 -pipe ... -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS ...
  --- hammer2_vnops.o ---
  cc -c -O2 -pipe -Wall ... /usr/src/sys/vfs/hammer2/hammer2_vnops.c -Werror
  (compiled clean under -Werror; also rebuilt as kld module with -DINVARIANTS)

  [poll 3] ===> dev/disk/nata/natapicd
  install -o root -g wheel -m 555   natapicd.ko /boot/kernel

  [poll 4] --------------------------------------------------------------
  BUILD_INSTALL_OK
  1
  BUILD_NOT_RUNNING

  $ ls -l /boot/kernel/kernel
  -r-xr-xr-x  1 root  wheel  119340608 Aug 28 20:32 /boot/kernel/kernel

  $ shutdown -r now
  -> DragonFly 6.5-DEVELOPMENT #1: Fri Aug 28 20:29:47 UTC 2026
     root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC   (uname -v after reboot)