DragonFlyBSD Kernel Audit
DF-1145 / build.log
← back to finding ↓ download raw
========================================================================
DF-1145 fix compile-validation  (iwm if_iwm.c)
Guest: DragonFly 6.5-DEVELOPMENT #0, cc 8.3, with-src snapshot (unpatched)
========================================================================

[1] BASELINE: full if_iwm.ko built clean from /usr/src under -Werror
    (includes if_iwm.o baseline = 79584 bytes)
    $ cd /usr/src/sys/dev/netif/iwm && make
    rc=0 ; if_iwm.ko produced (113640 bytes), no error:/warning:

[2] APPLY fix.diff:
    $ cd /usr/src && patch -p1 --forward < /root/df1145.diff
    Patching file sys/dev/netif/iwm/if_iwm.c using Plan A...
    Hunk #1 succeeded at 3099.
    Hunk #2 succeeded at 3149.
    Hunk #3 succeeded at 3225.
    Hunk #4 succeeded at 3354.
    done

[3] INCREMENTAL REBUILD of patched if_iwm.c:
    $ cd sys/dev/netif/iwm && rm -f if_iwm.o && make if_iwm.o
    cc -O2 -pipe ... -std=gnu11 -Werror -DKLD_MODULE ... \
       -c /usr/src/sys/dev/netif/iwm/if_iwm.c
    (no error:/warning: emitted under -Werror)

[4] RESULT:
    /usr/obj/usr/src/sys/dev/netif/iwm/if_iwm.o
      baseline  = 79584 bytes
      patched   = 79776 bytes   (+192 bytes from added payload checks)
    => fix.diff APPLIES + COMPILES clean.

[5] REVERT (source returned to unpatched baseline):
    $ cd /usr/src && patch -p1 -R < /root/df1145.diff
    Hunk #4 succeeded at 3340. ... done
    grep -c "firmware-supplied byte_count" if_iwm.c  ->  0  (clean)

RUNTIME: not exercised -- no WiFi HW on guest (latent). See run.sh / VERDICT.md.