DF-0586 / build.sh
#!/bin/sh # Build the DF-0586 harness + userspace driver inside the guest as maxx. # Must run from the poc/DF-0586/ directory on the guest. set -e echo "[build] userspace driver poc_race" cc -O2 -o poc_race poc_race.c -lpthread echo "[build] kld module df0586_harness.ko" # DragonFly module build via the in-kernel-module pattern. cat > Makefile <<'EOF' KMOD= df0586_harness SRCS= df0586_harness.c SRCS+= device_if.h bus_if.h KCFLAGS+=-I/usr/src/sys -I/usr/src/sys/sys WARNINGS_NO_UNUSED_LOCAL_WARN=-Wno-unused-but-set-variable .include <bsd.kmod.mk> EOF make 2>&1 | tail -30 ls -l df0586_harness.ko 2>&1 echo "BUILD_EXIT=0" |