DragonFlyBSD Kernel Audit
DF-0586 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0586 run.sh — runs the dense userspace driver; load df0586_harness.ko
# first (as root) to start the walker thread that drives hci_mtap.
set -e
cd "$(dirname "$0")"
if ! kldstat -n df0586_harness >/dev/null 2>&1; then
    echo "DF-0586 run.sh: df0586_harness.ko not loaded; the walker thread" >&2
    echo "that drives hci_mtap is required. As root run:" >&2
    echo "    kldload /home/maxx/poc/DF-0586/df0586_harness.ko" >&2
    echo "then re-run this script as maxx." >&2
    exit 1
fi
echo "DF-0586 run.sh: driving hci_mtap (kld walker) vs hci_sattach/hci_sdetach (userspace) for 30s..."
./poc_race 30
echo "DF-0586 run.sh: done. Check dmesg/boot.log for panic in hci_mtap."