# DF-2022 PoC — Unbounded ACK-poll loop in mxgpu_ai

## Trigger (host-assisted)

The guest cannot set the TRN_MSG_ACK bit it polls. The trigger is host-driven:

1. On the HOST, force `BIF_BX_PF0_MAILBOX_CONTROL` `TRN_MSG_ACK` asserted
   without ever clearing it. Methods:
   - Patch the PF amdgpu driver's mailbox ACK path to skip the deassert
   - Use a VFIO/mdev test shim that forces the register read at
     `AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE` (mxgpu_ai.h:56) to return bit1 set

2. In the GUEST, run as an unprivileged user:
   ```sh
   cc -o repro repro.c
   ./repro
   ```
   The PoC opens `/dev/dri/card0` which forces `amdgpu_driver_open` →
   `amdgpu_virt_request_full_gpu(false)` → ... → `xgpu_ai_mailbox_trans_msg` →
   unbounded `do/while(trn)` loop.

## Expected output

- The repro process enters permanent D-state; `ps -l` shows state `D`
- `kill -9` (SIGKILL) does NOT reap it (tsleep flags=0, no PCATCH)
- `procstat -p <pid>` shows tsleep channel `linux_msleep`
- `dmesg` floods with `trn=2 ACK should not assert! wait again !`
- The process is unkillable until reboot

No panic, no memory corruption — purely an unkillable-hang DoS.
