DragonFlyBSD Kernel Audit
DF-1141 / build.log
← back to finding ↓ download raw
========================================================================
DF-1141 fix compile-validation  (amdgpu ci_dpm.c, sys/dev/drm/amd/amdgpu)
Guest: DragonFly 6.5-DEVELOPMENT #0, cc 8.3, with-src snapshot (unpatched)
========================================================================

[1] BASELINE: full amdgpu.ko built clean from /usr/src under -Werror
    (includes ci_dpm.o baseline = 68080 bytes)
    $ cd /usr/src/sys/dev/drm/amd && make
    rc=0 ; amdgpu.ko produced (3742728 bytes), no error:/warning:

[2] APPLY fix.diff:
    $ cd /usr/src && patch -p1 --forward < /root/df1141.diff
    Patching file sys/dev/drm/amd/amdgpu/ci_dpm.c using Plan A...
    Hunk #1 succeeded at 3618.
    Hunk #2 succeeded at 3632.
    Hunk #3 succeeded at 3645.
    done

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

[4] RESULT:
    /usr/obj/usr/src/sys/dev/drm/amd/amdgpu/ci_dpm.o
      baseline  = 68080 bytes
      patched   = 68176 bytes   (+96 bytes from added clamp conditions/min())
    => fix.diff APPLIES + COMPILES clean.

[5] REVERT (source returned to unpatched baseline):
    $ cd /usr/src && patch -p1 -R < /root/df1141.diff
    Hunk #3 succeeded at 3643. ... done
    grep -c "&& i < MAX_REGULAR_DPM_NUMBER" ci_dpm.c  ->  0  (clean)

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