DF-5038 / gating_check.sh
#!/bin/sh # DF-5038 build-gating / fail-open verification (read-only; safe on any guest) # Proves, on the shipped guest binaries: # 1. ar9130Attach/ar9130Probe ARE compiled into ath_hal.ko (reachable code that # only ever fires on AR9130 SoC hardware via the apb bus - absent on x86). # 2. The "5G Radio Chip Rev ... not supported" rejection string is ABSENT from # the shipped ath_hal.ko => AH_DEBUG was NOT defined at build time => the # HAL_ENOTSUPP/goto-bad rejection at ar9130_attach.c:207-214 is compiled out # (fail-open) in the shipping configuration. # 3. cayman_default_state/size ship in radeon.ko (context for the sibling file). set -e echo "== uname ==" uname -a echo echo "== 1. ar9130 symbols present in ath_hal.ko (build gating) ==" nm /boot/kernel/ath_hal.ko | grep -i "ar9130Attach\|ar9130Probe\|EepromDataRead" echo echo "== 2. AH_DEBUG fail-open proof: rejection string absent ==" echo -n "count of 'not supported by this driver' strings in ath_hal.ko: " strings /boot/kernel/ath_hal.ko | grep -c "not supported by this driver" || true echo -n "count of '5G Radio Chip Rev' strings in ath_hal.ko: " strings /boot/kernel/ath_hal.ko | grep -c "5G Radio Chip Rev" || true echo "(0 = the #ifdef AH_DEBUG block was not compiled => fail-open ships)" echo echo "== 3. apb bus / ar9130 hardware presence (expect none) ==" kldstat -v 2>/dev/null | grep -ci "apb" || true pciconf -l 2>/dev/null | grep -c "0x000b" || true echo echo "== 4. cayman blob context (sibling file) ==" nm /boot/kernel/radeon.ko | grep -i "cayman_default" || true |