feat: U3 @sealed optional segment marking - phase 2 complete
- UTSM_SEG_F_UNSEALED: plaintext direct-store segments (zero crypto overhead) while keeping capability checks, dirty tracking, intent/commit log and seqlock protocol; default remains sealed - linker.ld: .sealed output section with __sealed_start/__sealed_end symbols for future static sealed data - selftest: unsealed segment stores plaintext verifiably + read-back, full SELFTEST PASS (.build_tmp/qemu_serial_u3sealed.log) - phase 2 (UTSM/UTRW) now complete in ROADMAP_INSANE
This commit is contained in:
@@ -20,6 +20,12 @@ int utsm_read(utsm_capability cap, u64 offset, void *dst, u64 len) {
|
||||
return status;
|
||||
}
|
||||
|
||||
/* U3: @unsealed 段 —— 明文直存,0 加解密开销(capability 校验照走) */
|
||||
if (desc->flags & UTSM_SEG_F_UNSEALED) {
|
||||
memcpy(dst, desc->cipher_base + offset, len);
|
||||
return UTSM_OK;
|
||||
}
|
||||
|
||||
utsm_key_material key;
|
||||
status = utsm_pckc_get_or_derive(cap.segment_slot, desc, &key);
|
||||
if (status != UTSM_OK) {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
utrw/read.o: utrw\read.c include\utsm\utrw.h include\utsm\types.h \
|
||||
include\utsm\status.h include\utsm\capability.h include\utsm\segment.h \
|
||||
include\utsm\uuid.h include\utsm\dirty.h include\utsm\pckc.h \
|
||||
include\utsm\config.h include\utsm\crypto.h
|
||||
include\utsm\utrw.h:
|
||||
include\utsm\types.h:
|
||||
include\utsm\status.h:
|
||||
include\utsm\capability.h:
|
||||
include\utsm\segment.h:
|
||||
include\utsm\uuid.h:
|
||||
include\utsm\dirty.h:
|
||||
include\utsm\pckc.h:
|
||||
include\utsm\config.h:
|
||||
include\utsm\crypto.h:
|
||||
Binary file not shown.
@@ -21,6 +21,18 @@ int utsm_write(utsm_capability cap, u64 offset, const void *src, u64 len) {
|
||||
return status;
|
||||
}
|
||||
|
||||
/* U3: @unsealed 段 —— 明文直存,0 加解密开销;dirty/seqlock/log 照走,
|
||||
* checkpoint 路径对明文页同样适用(页 MAC 语义由 DRR 侧统一处理)。 */
|
||||
if (desc->flags & UTSM_SEG_F_UNSEALED) {
|
||||
drr_log_write_intent(cap.segment_slot, offset, len);
|
||||
desc->writer_seq++;
|
||||
memcpy(desc->cipher_base + offset, src, len);
|
||||
utsm_mark_dirty(desc, offset, len);
|
||||
desc->writer_seq++;
|
||||
drr_log_write_commit(cap.segment_slot, offset, len);
|
||||
return UTSM_OK;
|
||||
}
|
||||
|
||||
utsm_key_material key;
|
||||
status = utsm_pckc_get_or_derive(cap.segment_slot, desc, &key);
|
||||
if (status != UTSM_OK) {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
utrw/write.o: utrw\write.c include\utsm\utrw.h include\utsm\types.h \
|
||||
include\utsm\status.h include\utsm\capability.h include\utsm\segment.h \
|
||||
include\utsm\uuid.h include\utsm\dirty.h include\utsm\pckc.h \
|
||||
include\utsm\config.h include\utsm\crypto.h include\utsm\drr.h
|
||||
include\utsm\utrw.h:
|
||||
include\utsm\types.h:
|
||||
include\utsm\status.h:
|
||||
include\utsm\capability.h:
|
||||
include\utsm\segment.h:
|
||||
include\utsm\uuid.h:
|
||||
include\utsm\dirty.h:
|
||||
include\utsm\pckc.h:
|
||||
include\utsm\config.h:
|
||||
include\utsm\crypto.h:
|
||||
include\utsm\drr.h:
|
||||
Binary file not shown.
Reference in New Issue
Block a user