DragonFlyBSD Kernel Audit
DF-2206 / build.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-2206 build.sh -- applies fix.diff to in-guest /usr/src and rebuilds drm.ko
# Source-only / HW-gated finding: there is no live trigger to exercise.
# Phase 8 evidence = the patched module compiles cleanly under -Werror.
set -e
cd "$(dirname "$0")"
# Apply on the in-guest source tree (push + patch).
scp -q -F dfbsd-qemu/../../../dfbsd-qemu/config fix.diff dfbsd:/root/DF-2206.fix.diff || \
  scp -q -F "$(dirname "$0")/../../../dfbsd-qemu/config" fix.diff dfbsd:/root/DF-2206.fix.diff
"$(dirname "$0")/../../../dfbsd-qemu/vm.sh" run_root \
  'cd /usr/src && patch -p1 --forward < /root/DF-2206.fix.diff && echo APPLIED'
"$(dirname "$0")/../../../dfbsd-qemu/vm.sh" run_root \
  'cd /usr/src/sys/dev/drm/drm && rm -f linux_iomapping.o drm.ko && make 2>&1; echo "=== DRM_KO rc=$? ==="; ls -l drm.ko'