⬢ DragonFlyBSD Kernel Audit
DF-4647 / df4647d.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-4647 variant D: A (volume write, 6s SVOL hold), C (second VOLUME write,
# queued on the volume oid_lock in sysctl_root), root kldunload -> oid
# lockuninit + kfree under holder A and waiter C; B queued on serial.
L=/root/df4647_runD.log
: > $L
ts() { date +%s; }
kldload acpi_fujitsu 2>/dev/null
sleep 1
echo "T0=$(ts)" >> $L
( echo "A_START=$(ts)" >> $L; sysctl -w hw.acpi.fujitsu.volume=7 > /root/A.log 2>&1; echo "A_DONE=$(ts) rc=$?" >> $L ) &
sleep 0.5
( echo "C_START=$(ts)" >> $L; sysctl -w hw.acpi.fujitsu.volume=9 > /root/C.log 2>&1; echo "C_DONE=$(ts) rc=$?" >> $L ) &
sleep 0.5
( echo "B_START=$(ts)" >> $L; sysctl -w hw.acpi.fujitsu.lcd_brightness=5 > /root/B.log 2>&1; echo "B_DONE=$(ts) rc=$?" >> $L ) &
sleep 1
echo "T_UNLOAD_START=$(ts)" >> $L
kldunload acpi_fujitsu >> $L 2>&1
echo "T_UNLOAD_DONE=$(ts) rc=$? gone=$(kldstat | grep -c fujitsu)" >> $L
sleep 6
echo "A: $(tail -1 /root/A.log)" >> $L
echo "C: $(tail -1 /root/C.log)" >> $L
echo "B: $(tail -1 /root/B.log)" >> $L
echo "T_END=$(ts)" >> $L
cat $L