DF-5581 / probe.sh
#!/bin/sh # DF-5581 verification probe: observable surface of pci_early_quirks() and # absence of any stolen-memory reservation mechanism. # # Run on the audit guest (dfbsd-qemu/vm.sh). Two halves: # (1) as an unprivileged user: read the two sysctls the quirk exports # (2) as root: identify 0:2:0 (the gate input), grep the full /usr/src for # phys_avail_reserve (the disabled reservation), check i915 load state # # Expected on the QEMU rig (NO Intel iGPU device model exists in QEMU): # - sysctls readable by uid!=0, value 0 (vendor gate rejects Bochs VGA) # - 0:2:0 class=0x0300 (passes class gate) but chip vendor 0x1234 (fails # the vendor gate at pci_early_quirks.c:288) -> quirk inert on this rig # - phys_avail_reserve exists ONLY as the commented-out call at # pci_early_quirks.c:309 -> reservation NEVER happens, tree-wide # - i915 not loaded echo "== [1] unprivileged user ==" id sysctl hw.intel_graphics_stolen_base hw.intel_graphics_stolen_size echo "== [2] root ==" pciconf -l | grep 'pci0:0:2:0' grep -rn "phys_avail_reserve" /usr/src/sys/ --include='*.c' --include='*.h' echo "grep_hits_done" kldstat | grep i915 || echo "i915: not loaded" uname -a |