feat: SKEL skeleton instrumentation - designed-but-unimplemented paths panic
- hypercall.c: 5 Phase 1.3 stubs -> HCALL-E01..E05 panic (no NOSYS return) - drr_stub.c: snapshot alloc fail -> DRR-E01; new skeletons DRR-E02 root key seal, DRR-E03 task kill crypto erase, DRR-E04/E05 segment/system rollback, DRR-E06/E07 driver recovery ops dispatch - sched.c: enable fail -> SCH-E02 panic (no silent demo skip) - dkm/kernel_api.c: D1 hot-unload DKM-E01, D2 bare code loader DKM-E02, SIPI AP wake DKM-E03 skeletons - virtio_net tx/rx stubs -> VNET-E01/E02; ath9k tx stub -> ATH-E01; xhci port reset -> XHC-E01; nvme MSI/MSI-X fail -> NVME-E01..E03 (no silent polling downgrade); e1000 MAC fallback -> E1K-E01 - pe_shim unimpl API -> PE-E01; PE ordinal import -> PE-E02 - kernel/main.c: lib sync / vscode install fail -> LNX-E01/E02 - NEW brand/brand.c (E1 boot anim BRAND-E01, E2 time egg BRAND-E02) and pkg/pkg.c (pacman skeleton PKG-E01..03), wired into UTSM MAKEFILE - Deliberate design-internal fallbacks kept and documented (VMX skip, bzImage skip, KDE fallback, boot-module fallback, apic->PIC route)
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "../include/utsm/pe.h" /* P5: pe_window_host */
|
||||
#include <utsm/arena.h>
|
||||
#include <utsm/log.h>
|
||||
#include <utsm/panic.h>
|
||||
#include <utsm/types.h>
|
||||
#include "../arch/x86_64/limine.h"
|
||||
|
||||
@@ -1753,11 +1754,15 @@ static u64 __attribute__((ms_abi)) shim_SetDIBitsToDevice(
|
||||
return copied;
|
||||
}
|
||||
|
||||
/* 未实现 stub(64位)— 日志告警(含调用点返回地址)并返回 0 */
|
||||
/* 未实现 stub(64位)——严格错误策略插桩:PE 应用调到 shim 表未覆盖的
|
||||
* API = 未实现路径,按零降级原则 panic(PE-E01),不再告警返回 0。
|
||||
* shim 表没有的 API 一旦被调用,PE 程序的语义已经是错的。 */
|
||||
static u64 __attribute__((ms_abi)) shim_unimpl64(u64 a0, u64 a1, u64 a2, u64 a3) {
|
||||
(void)a0; (void)a1; (void)a2; (void)a3;
|
||||
log_warn("[PE] unimplemented API called");
|
||||
log_error("[PE] unimplemented API called");
|
||||
log_hex64("[PE] caller rip=", (u64)__builtin_return_address(0));
|
||||
panic_full("PE-E01 UNSHIMMED API CALLED",
|
||||
"PE app imported an API outside the shim table: not implemented", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user