S125 · SOURCE-BOUND GATE EVIDENCE
K1: owned user page-table forest, kmap penceresi ve ELF LOAD/stack frame ledger'ı
Operations --test hedefi → simulation public mod kernel_user_page_table bağı → kaynak kesiti Bu sayfa yalnız S125 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S125Focused kod testiOperations id exactsource SHA exacttest target exact
operation: k1-user-page-table-kmap-frame-ledger-partial
uygulama/model · focused test · Operations · 3 exact excerpt
sequence-bound=true · implementation-bound=false
01 · Testin bağlı olduğu uygulama/model kodu
Kapının yürüttüğü gerçek kaynak
tam Rust öğesiL39–L49
kernel/src/mm/user_page_table.rs::UserPageTableForest
impl UserLeafPermissions {
#[inline]
const fn flags(self) -> PageTableFlags {
match self {
Self::ReadExecute => PageTableFlags::G7C_USER_TEXT,
Self::ReadOnly => PageTableFlags::G7C_USER_RODATA,
Self::ReadWrite => PageTableFlags::G7C_USER_STACK,
}
}
}snippet sha256: 09810118167c…file sha256: 3e0c72b595f2…
02 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam Rust öğesiL191–L210
simulation/tests/user_page_table_forest.rs::clone_shares_the_reserved_kmap_l0_descriptor_without_owning_its_tables
#[test]
fn clone_shares_the_reserved_kmap_l0_descriptor_without_owning_its_tables() {
let mut kernel_root = Box::new(PageTable::new());
let mut kmap_l1 = Box::new(PageTable::new());
let mut descriptor = PageTableEntry::empty();
descriptor.set_flags(PageTableFlags::VALID | PageTableFlags::TABLE);
descriptor.set_address(PhysAddr::new((&mut *kmap_l1 as *mut PageTable) as u64));
kernel_root.entries_mut()[KERNEL_KMAP_L0_INDEX] = descriptor;
let forest = unsafe { UserPageTableForest::try_clone_kernel_root(&kernel_root, 0) }
.expect("shared kmap L0 is not a forest-owned child");
assert_eq!(forest.table_count(), 1);
let cloned_l0 = unsafe { &*forest.root_phys().as_ptr::<PageTable>() };
assert_eq!(
cloned_l0.entries()[KERNEL_KMAP_L0_INDEX].address().as_u64(),
(&*kmap_l1 as *const PageTable) as u64,
"kmap subtree must be shared by address, not cloned"
);
}snippet sha256: e2845665e7d2…file sha256: 0c8b3c007ae7…
03 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL26903–L26970
website/src/lib/operations.ts::k1-user-page-table-kmap-frame-ledger-partial
{
id: "k1-user-page-table-kmap-frame-ledger-partial",
date: "2026-08-23",
sequence: 125,
status: "passed",
umbrella_status: "partial",
title:
"K1: owned user page-table forest, kmap penceresi ve ELF LOAD/stack frame ledger'ı",
summary:
"S123 fiziksel zinciri değişmeden K1 source-only dilimi ilerledi. Kullanıcı kökü artık tek Owner `UserPageTableForest`; L3 leaf yalnız tipli RX/RO/RW ve nG. Kapasite ön-uç preflight kısmi descriptor bırakmaz. Ayrılmış TTBR0 L0 255 kmap penceresi (32×4K) user forest'ta paylaşılır, kopyalanmaz; yapraklar EL1-only PXN+UXN+nG. AddressSpace/Task LOAD ve usable-stack frame'lerini tutar. Reaper sırası: quiescence → forest drop → kmap scrub → ASID-last. Framebuffer grant reclaim edilebilir ham root pointer saklamaz. Bu K1 COMPLETE değildir: QEMU ELF spawn hâlâ bump penceresi kullanır, scrub edilen frame RuntimePmm'ye dönmez.",
evidence: [
"User page-table forest host davranış 6/6 PASS: exact nG mapping, walk reuse, capacity preflight without partial descriptors, kernel-leaf clone with distinct intermediates, shared kmap L0 by address, and ReservedKernelWindow reject.",
"Kernel kmap slot allocator host 3/3 PASS: L0 index 255, 32 contiguous exclusive slots, drop releases holes, empty/oversize fail without consuming bits.",
"Kmap/MMU/reaper source-contract 4/4 PASS: shared L0 never cloned into the forest Vec, map_kmap_pages rejects USER/X and rolls back partial leaves, KernelMap Drop unmaps then releases slots, reaper scrubs owned frames through kmap after the forest and before free_asid.",
"Lifecycle/ASID/ELF source kapıları PASS: task_lifecycle 5/5, task_spawn_asid 4/4, elf_loader_source owned_frames handoff, kernel_wx 6/6 including KERNEL_KMAP_RO/RW nG+PXN+UXN and no EL0.",
"Framebuffer grant lifetime 2/2: grant type stores mapped_size not a reclaimable target_root; revoke re-resolves the live task.",
"Runtime typed access 18/18 host PASS korunur; generation-bound kmap/scrub token close/TLBI witness olmadan reuse yok.",
"QEMU ve RPi5 `aarch64-unknown-none` cargo check PASS. Bu compile applicability'dir, QEMU smoke veya fiziksel BOOT8H değildir.",
],
commands: [
"cargo test -p aselsan_microkernel_simulation --test user_page_table_forest --test kernel_kmap_slots --test kernel_kmap_source",
"cargo test -p aselsan_microkernel_simulation --test elf_loader_source --test task_spawn_asid_source --test task_lifecycle_source --test kernel_wx_source --test framebuffer_root_lifetime_source",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-qemu",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
],
terminalSessions: [
{
id: "s125-kmap-forest-host",
title: "Forest + kmap host davranış ve source kapıları",
commandLines: [
"cargo test -p aselsan_microkernel_simulation --test user_page_table_forest --test kernel_kmap_slots --test kernel_kmap_source",
],
outputLines: [
"user_page_table_forest: 6 passed",
"kernel_kmap_slots: 3 passed",
"kernel_kmap_source: 4 passed",
],
exitCode: 0,
outputMode: "selected",
},
{
id: "s125-lifecycle-wx-check",
title: "Lifecycle/ELF/W^X kapıları ve iki AArch64 check",
commandLines: [
"cargo test -p aselsan_microkernel_simulation --test task_lifecycle_source --test task_spawn_asid_source --test elf_loader_source --test kernel_wx_source",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-qemu",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
],
outputLines: [
"task_lifecycle_source: 5 passed",
"task_spawn_asid_source: 4 passed",
"kernel_wx_source: 6 passed",
"board-qemu aarch64-unknown-none check: PASS",
"board-rpi5 aarch64-unknown-none check: PASS",
],
exitCode: 0,
outputMode: "selected",
},
],
terminalSessionsNote:
"S125 yalnız host/source ve compile applicability kaydıdır. QEMU smoke, microSD, UART, Pi gücü ve physical BOOT8H bu sırada çalıştırılmadı.",
limitations: [
"K1 COMPLETE değildir. QEMU ELF spawn hâlâ 0x4500_0000 bump penceresi kullanır; scrub edilen LOAD/stack frame'ler RuntimePmm'ye dönmez.",
"Legacy BumpAllocator deallocate_frame no-op kalır. Per-frame domain ownership, supervisor reclaim ve SMP-grade reaper açık.",
"S124 archive/promotion bu yazılım kaydıyla tüketilmez ve STOP kalır. Son boot/runtime PASS S92 BOOT8G / CPU1_PER_CPU_TIMER_ONLY; PHYSICAL_BOOT8H=REJECTED_NO_PASS.",
"CARD_WRITE=0, PHYSICAL_CARD_READBACK=0, SYNC=0, EJECT=0, UART=STOP, POWER=STOP ve PHYSICAL_BOOT8H=STOP.",
],
},snippet sha256: 0198ea5ecff1…file sha256: 9726dbf00f84…
Focused test komutu
cargo test -p aselsan_microkernel_simulation --test user_page_table_forest --test kernel_kmap_slots --test kernel_kmap_sourceRegistry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 3050638b71a684d8f8f947a8a6faa237a17fa8db5dc0db04fb207b668b462af9