feat: SAS-R0 boot-time capability attestation - unimplemented feature blocks boot

- attest.c: subsystems report readiness, attest_check() before DSK handoff

- FUCK [attest] require_<name>=1 (default) + not-ready -> lotus panic with feature errcode

- wired: sealed_mem/pckc/sched/drr/fs_fat32_rw/net_wired + placeholders (pkg/brand/dkm/nvme/virtio/wlan/vmx/drr_real_mac)

- negative test: require_pkg=1 -> boot-time PKG-E10 panic (verified); dev/release FUCK whitelist = STATUS.md undone items

- CLAUDE.md whitelist rule updated
This commit is contained in:
Linehu
2026-10-04 21:34:50 +08:00
parent 25fbabe368
commit 87d532df01
9 changed files with 291 additions and 3 deletions
+29
View File
@@ -0,0 +1,29 @@
#ifndef UTSM_ATTEST_H
#define UTSM_ATTEST_H
#include <utsm/types.h>
/* ============================================================
* SAS-R0 启动期能力证明(boot-time feature attestation)
*
* 哲学:设计已定的能力,"没好"不允许带病启动——
* 各子系统就绪时 attest_report() 打点;内核交接 DSK 前
* attest_check() 统一核查。FUCK [attest] require_<name>=1
* (默认 1)而能力未就绪 → 莲花屏 panic 带该能力的错误码。
* ============================================================ */
/* 就绪打点。errcode 为该能力"未就绪"时的 panic 错误码。
* 同名重复 report 覆盖 ready 标志(后到的真实探测为准)。 */
void attest_report(const char *name, const char *errcode, int ready);
/* 便捷封装:就绪打点 */
void attest_report_ready(const char *name, const char *errcode);
/* 交接 DSK 前核查:缺一项即 panic(先串口列出全部缺失项)。
* cfg = FUCK ini_config*(用 void* 规避 ini_config 前向声明问题)。 */
void attest_check(const void *cfg);
/* 当前缺失项计数(调试/日志用) */
u32 attest_missing_count(void);
#endif /* UTSM_ATTEST_H */
+3
View File
@@ -84,6 +84,9 @@ typedef struct dkm_net_api {
} dkm_net_api;
void net_init(void);
/* attest: 有线/无线设备计数(启动期能力证明用,见 utsm/attest.h) */
void net_attest_counts(u32 *out_total, u32 *out_wireless);
const dkm_net_api *net_get_api(void);
#endif