feat: sealed memory early init + verify - UTSM-E01..E04 very-early panic

- NEW core/sealed.c: utsm_sealed_early_init() runs right after utsm_init:
  empty .sealed section -> UTSM-E01 panic; no root key -> UTSM-E02;
  establishes BLAKE2b(root_key) MAC over [__sealed_start,__sealed_end).
- utsm_sealed_verify(): MAC mismatch -> UTSM-E03; verify-before-init ->
  UTSM-E04. Wired into utsm_selftest (U3+ step).
- .sealed region now non-empty by construction: sealed brand record
  "DESHAB-SEALED-MEMORY-V1-DEAICUP" lives in section(".sealed").
- Before this commit nothing ever referenced __sealed_start/__sealed_end:
  the sealed section was never registered, MACed or verified.
- QEMU verify: [SEAL] region=0x20 bytes, MAC established, selftest OK,
  boot reaches wizard, zero spurious panics.

[STUB] P0/UTSM/core/sealed.c | 剩余STUB命中=101(违规=0) | “封缄即落款,空区即自爆” | 已提交=<this>
This commit is contained in:
Linehu
2026-10-03 15:40:00 +08:00
parent 301006d611
commit dda0cc9dd0
11 changed files with 130 additions and 11 deletions
+9
View File
@@ -0,0 +1,9 @@
core/sealed.o: core\sealed.c include\utsm\types.h include\utsm\panic.h \
include\utsm\log.h include\utsm\blake2b.h include\utsm\drr.h \
include\utsm\config.h
include\utsm\types.h:
include\utsm\panic.h:
include\utsm\log.h:
include\utsm\blake2b.h:
include\utsm\drr.h:
include\utsm\config.h: