kernel: probe V3 passed, the hardware RNG symbols are required
ci / qemu-tools (pull_request) Successful in 50s
ci / patches-apply (pull_request) Successful in 26s
ci / mcdc (push) Successful in 18s
ci / patches-apply (push) Successful in 24s
ci / test (push) Successful in 11s
ci / bench (push) Successful in 8s
ci / qemu-tools (push) Successful in 50s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / kernel-symbols (push) Successful in 2m21s
ci / test (pull_request) Successful in 12s
ci / quality (push) Successful in 33s
ci / badges (push) Skipped
ci / mcdc (pull_request) Successful in 17s
ci / bench (pull_request) Successful in 7s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 34s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 2m20s
ci / qemu-tools (pull_request) Successful in 50s
ci / patches-apply (pull_request) Successful in 26s
ci / mcdc (push) Successful in 18s
ci / patches-apply (push) Successful in 24s
ci / test (push) Successful in 11s
ci / bench (push) Successful in 8s
ci / qemu-tools (push) Successful in 50s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / kernel-symbols (push) Successful in 2m21s
ci / test (pull_request) Successful in 12s
ci / quality (push) Successful in 33s
ci / badges (push) Skipped
ci / mcdc (pull_request) Successful in 17s
ci / bench (pull_request) Successful in 7s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 34s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 2m20s
Probe V3 (d09 T14, AT-M0-33) on the bench panel with the batch kernel: /dev/hwrng from the rockchip-rng driver, a 2.6 MB read in 2.4 s (1058 KiB/s) without blocking, and 1 FIPS 140-2 failure in 1000 blocks (limit 3). CONFIG_HW_RANDOM and CONFIG_HW_RANDOM_ROCKCHIP move from probe-symbols.txt to required-symbols.txt; the probe list is now empty, which build-kernel.sh accepts (it skips an empty probe list; the required list may never be empty). The config does not change: the defconfig already built both in, and the digest stays ec276f77. Regression tests (run-required-symbols-tests.sh): both symbols asserted and built in, a config without either is refused by name, the probe list may be empty. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cxh2piVufTWbzKTmUafTkk
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
cf72a6dcbc
commit
35dc64714e
@@ -150,7 +150,10 @@ make -C "$SRC" ARCH=arm CROSS_COMPILE="$CROSS_COMPILE" olddefconfig >/dev/null
|
||||
# covering IPv6 that way. build/required-symbols.txt (and build/probe-symbols.txt
|
||||
# for a probe kernel) is the one list; every symbol in it is built in (=y, the
|
||||
# panel has no /lib/modules) or explicitly unset.
|
||||
req_assert_config "$SRC/.config" "$REQ_SYMBOLS" "$PROBE_SYMBOLS" || exit 1
|
||||
# The probe list may be empty (every probe has passed); the required list may not.
|
||||
PROBE_LISTS=()
|
||||
[ -n "$(req_assertions "$PROBE_SYMBOLS")" ] && PROBE_LISTS=("$PROBE_SYMBOLS")
|
||||
req_assert_config "$SRC/.config" "$REQ_SYMBOLS" ${PROBE_LISTS[@]+"${PROBE_LISTS[@]}"} || exit 1
|
||||
log "required symbols verified in final .config ($(req_assertions "$REQ_SYMBOLS" | wc -l) required, $(req_assertions "$PROBE_SYMBOLS" | wc -l) probe)"
|
||||
|
||||
# Fragment took-effect assertion: merge_config -m only pastes text, and
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
## Tier P: symbols built into the test kernel to run a probe (rebuild M0).
|
||||
## Asserted like required-symbols.txt. A symbol moves to required-symbols.txt
|
||||
## when its probe passes on the panel, and leaves this file and the defconfig
|
||||
## when it fails.
|
||||
## Tier P: symbols built into a test kernel to run a probe (rebuild M0).
|
||||
## Asserted like required-symbols.txt. A symbol moves to required-symbols.txt when its probe
|
||||
## passes on the panel, and leaves this file and the defconfig when it fails.
|
||||
##
|
||||
## tier P probe V3 (N-36, d06 O14, d09 T14): hardware RNG
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_ROCKCHIP=y
|
||||
## Empty on purpose: probe V3 (hardware RNG, N-36, d06 O14, d09 T14) passed on 2026-10-09, so
|
||||
## CONFIG_HW_RANDOM and CONFIG_HW_RANDOM_ROCKCHIP moved to required-symbols.txt. An empty list
|
||||
## is valid for this file (build-kernel.sh skips it); required-symbols.txt may never be empty.
|
||||
|
||||
@@ -53,6 +53,12 @@ CONFIG_NFT_LIMIT=y
|
||||
CONFIG_NFT_SOCKET=y
|
||||
CONFIG_NFT_REJECT=y
|
||||
##
|
||||
## tier R hardware RNG (N-36, d06 O14). Probe V3 passed on the bench panel on 2026-10-09
|
||||
## (/dev/hwrng from rockchip-rng, 2.6 MB read in 2.4 s, 1 FIPS 140-2 failure in 1000 blocks), so
|
||||
## the two symbols moved here from probe-symbols.txt.
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_ROCKCHIP=y
|
||||
##
|
||||
## tier A power: no suspend (Noah 2026-10-09). The two lines below are derived
|
||||
## off with it; assert them so a Kconfig change cannot bring them back.
|
||||
# CONFIG_SUSPEND is not set
|
||||
|
||||
@@ -31,8 +31,11 @@ mkconfig() { # <list> <out>
|
||||
echo 'CONFIG_SOMETHING_ELSE=y'; } > "$2"
|
||||
}
|
||||
|
||||
mkconfig "$REQ" "$TMP/good-req"; mkconfig "$PROBE" "$TMP/good-probe"; cat "$TMP/good-req" "$TMP/good-probe" > "$TMP/good"
|
||||
req_assert_config "$TMP/good" "$REQ" "$PROBE" >/dev/null 2>&1 \
|
||||
# The probe list may be empty once every probe has passed (build-kernel.sh then skips it);
|
||||
# PROBES is the list to pass along: the probe list when it holds assertions, nothing otherwise.
|
||||
PROBES=(); [ -n "$(req_assertions "$PROBE")" ] && PROBES=("$PROBE")
|
||||
mkconfig "$REQ" "$TMP/good-req"; : > "$TMP/good-probe"; [ "${#PROBES[@]}" = 0 ] || mkconfig "$PROBE" "$TMP/good-probe"; cat "$TMP/good-req" "$TMP/good-probe" > "$TMP/good"
|
||||
req_assert_config "$TMP/good" "$REQ" ${PROBES[@]+"${PROBES[@]}"} >/dev/null 2>&1 \
|
||||
&& ok "a config that satisfies both lists passes" || bad "a satisfying config was refused"
|
||||
|
||||
n=$(req_assertions "$REQ" | wc -l)
|
||||
@@ -43,21 +46,21 @@ missing_ok=0; missing_bad=0
|
||||
while IFS= read -r line; do
|
||||
case "$line" in CONFIG_*=y) ;; *) continue ;; esac
|
||||
grep -vxF "$line" "$TMP/good" > "$TMP/cfg-missing"
|
||||
if req_assert_config "$TMP/cfg-missing" "$REQ" "$PROBE" >/dev/null 2>&1; then missing_bad=$((missing_bad+1)); echo " not caught: $line"
|
||||
if req_assert_config "$TMP/cfg-missing" "$REQ" ${PROBES[@]+"${PROBES[@]}"} >/dev/null 2>&1; then missing_bad=$((missing_bad+1)); echo " not caught: $line"
|
||||
else missing_ok=$((missing_ok+1)); fi
|
||||
done < <(req_assertions "$REQ"; req_assertions "$PROBE")
|
||||
[ "$missing_bad" = 0 ] && ok "dropping any one of $missing_ok =y assertions fails the check" || bad "$missing_bad dropped symbols were not caught"
|
||||
|
||||
# =m is not =y
|
||||
sed 's/^CONFIG_NFT_CT=y$/CONFIG_NFT_CT=m/' "$TMP/good" > "$TMP/cfg-m"
|
||||
req_assert_config "$TMP/cfg-m" "$REQ" "$PROBE" >/dev/null 2>&1 && bad "a modular symbol was accepted" || ok "a symbol built as a module is refused"
|
||||
req_assert_config "$TMP/cfg-m" "$REQ" ${PROBES[@]+"${PROBES[@]}"} >/dev/null 2>&1 && bad "a modular symbol was accepted" || ok "a symbol built as a module is refused"
|
||||
|
||||
# unset assertions: a live value fails, absence and 'is not set' pass
|
||||
for sym in $(req_assertions "$REQ" | sed -n 's/^# \(CONFIG_[A-Z0-9_]*\) is not set$/\1/p'); do
|
||||
{ cat "$TMP/good"; echo "$sym=y"; } > "$TMP/cfg-set"
|
||||
req_assert_config "$TMP/cfg-set" "$REQ" "$PROBE" >/dev/null 2>&1 && bad "$sym=y was accepted although it must stay unset" || ok "$sym=y is refused (must stay unset)"
|
||||
req_assert_config "$TMP/cfg-set" "$REQ" ${PROBES[@]+"${PROBES[@]}"} >/dev/null 2>&1 && bad "$sym=y was accepted although it must stay unset" || ok "$sym=y is refused (must stay unset)"
|
||||
grep -vF "$sym" "$TMP/good" > "$TMP/cfg-absent"
|
||||
req_assert_config "$TMP/cfg-absent" "$REQ" "$PROBE" >/dev/null 2>&1 && ok "$sym absent from the config is accepted" || bad "$sym absent from the config was refused"
|
||||
req_assert_config "$TMP/cfg-absent" "$REQ" ${PROBES[@]+"${PROBES[@]}"} >/dev/null 2>&1 && ok "$sym absent from the config is accepted" || bad "$sym absent from the config was refused"
|
||||
done
|
||||
|
||||
# No suspend (Noah 2026-10-09): CONFIG_SUSPEND and CONFIG_PM_SLEEP are asserted unset, the
|
||||
@@ -68,7 +71,7 @@ for sym in CONFIG_SUSPEND CONFIG_PM_SLEEP; do
|
||||
req_assertions "$REQ" | grep -qxF "# $sym is not set" \
|
||||
&& ok "required-symbols.txt asserts $sym unset" || bad "required-symbols.txt does not assert $sym unset"
|
||||
{ cat "$TMP/good"; echo "$sym=y"; } > "$TMP/cfg-suspend"
|
||||
out=$(req_assert_config "$TMP/cfg-suspend" "$REQ" "$PROBE" 2>&1) && bad "$sym=y was accepted" \
|
||||
out=$(req_assert_config "$TMP/cfg-suspend" "$REQ" ${PROBES[@]+"${PROBES[@]}"} 2>&1) && bad "$sym=y was accepted" \
|
||||
|| { printf '%s' "$out" | grep -q "$sym" && ok "$sym=y is refused naming $sym" || bad "$sym=y was refused without naming it"; }
|
||||
done
|
||||
grep -qxF '# CONFIG_SUSPEND is not set' "$DEFCONFIG" \
|
||||
@@ -76,6 +79,18 @@ grep -qxF '# CONFIG_SUSPEND is not set' "$DEFCONFIG" \
|
||||
|| bad "warden_defconfig lost the explicit # CONFIG_SUSPEND is not set (the Kconfig default is y)"
|
||||
grep -qE '^CONFIG_SUSPEND=' "$DEFCONFIG" && bad "warden_defconfig sets CONFIG_SUSPEND" || ok "warden_defconfig does not set CONFIG_SUSPEND"
|
||||
|
||||
# Probe V3 passed (2026-10-09): the hardware RNG symbols are required, the probe list is empty, and
|
||||
# the config digest does not move because the defconfig already built them in.
|
||||
for sym in CONFIG_HW_RANDOM CONFIG_HW_RANDOM_ROCKCHIP; do
|
||||
req_assertions "$REQ" | grep -qxF "$sym=y" && ok "required-symbols.txt asserts $sym=y (V3 passed)" || bad "required-symbols.txt lost $sym=y"
|
||||
grep -qxF "$sym=y" "$DEFCONFIG" && ok "warden_defconfig builds $sym in" || bad "warden_defconfig does not set $sym=y"
|
||||
{ cat "$TMP/good"; } | grep -vxF "$sym=y" > "$TMP/cfg-norng"
|
||||
out=$(req_assert_config "$TMP/cfg-norng" "$REQ" 2>&1) && bad "a config without $sym was accepted" \
|
||||
|| { printf '%s' "$out" | grep -q "$sym" && ok "a config without $sym is refused naming it" || bad "refusal did not name $sym"; }
|
||||
done
|
||||
[ -z "$(req_assertions "$PROBE")" ] && ok "probe-symbols.txt is empty: every probe has passed" \
|
||||
|| ok "probe-symbols.txt holds $(req_assertions "$PROBE" | wc -l) pending probe symbol(s)"
|
||||
|
||||
# fail-closed shapes
|
||||
: > "$TMP/empty"
|
||||
req_assert_config "$TMP/empty" "$REQ" >/dev/null 2>&1 && bad "an empty config was accepted" || ok "an empty config is refused"
|
||||
@@ -89,7 +104,7 @@ printf '## c\n# CONFIG_PROSE is the name of a thing\nCONFIG_REAL=y\n' > "$TMP/pr
|
||||
|
||||
# the lists: a symbol is asserted once, in one list
|
||||
dups=$( { req_assertions "$REQ"; req_assertions "$PROBE"; } | sed 's/^# //; s/ is not set//; s/=.*//' | sort | uniq -d | tr '\n' ' ')
|
||||
# HW_RANDOM may appear in the probe list only; anything else twice is a mistake
|
||||
# a symbol that passed its probe moves to the required list; it must not stay in both
|
||||
[ -z "$dups" ] && ok "no symbol is asserted twice across the lists" || bad "symbols asserted twice: $dups"
|
||||
|
||||
# build-kernel.sh entry checks (they run before the tarball is touched)
|
||||
@@ -104,7 +119,7 @@ out=$(env -u WORK -u CONFIG_OUT PATH="$TMP/bin:$PATH" WARDEN_CONFIG_ONLY=1 bash
|
||||
|| bad "config-only without CONFIG_OUT was not refused: $out"
|
||||
|
||||
# wiring text
|
||||
grep -q 'req_assert_config "\$SRC/.config" "\$REQ_SYMBOLS" "\$PROBE_SYMBOLS"' "$BK" \
|
||||
grep -q 'req_assert_config "\$SRC/.config" "\$REQ_SYMBOLS" \${PROBE_LISTS' "$BK" \
|
||||
&& ok "build-kernel.sh asserts both lists" || bad "build-kernel.sh does not assert the lists"
|
||||
grep -q 'for sym in CONFIG_' "$BK" && bad "build-kernel.sh has a hand-written symbol list again" || ok "build-kernel.sh has no hand-written list"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user