#!/bin/sh
# DF-2999 run (in guest, as UNPRIVILEGED user, HAMMER1 mounted at /mnt/h1).
# WARNING: on a vulnerable kernel this wedges one cpu permanently (unkillable)
# and poisons the file's vnode; the guest becomes unshut-downable.  Only run
# inside a throwaway VM (revert to a snapshot afterwards).
nohup /tmp/op2999 /mnt/h1/op2999.bin > /tmp/op2999.log 2>&1 &
sleep 15
cat /tmp/op2999.log
ps ax -o pid,stat,command | grep op2999 | grep -v grep
echo "kill -9 test (no effect on a vulnerable kernel):"
pkill -9 op2999; sleep 2
ps ax -o pid,stat,command | grep op2999 | grep -v grep
