S332 · SOURCE-BOUND GATE EVIDENCE
S332 · Current-capability insert production writer guard integration
production acquire → S247 guard modülü → Operations-bound focused test Bu sayfa yalnız S332 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S332Production writer guardOperations id exactsource SHA exacttest target exact
operation: g8l-s332-current-capability-insert-writer-guard-integration-partial
production · S247 guard · focused test · Operations · 4 exact excerpt
sequence-bound=true · implementation-bound=true
01 · Test edilen uygulama/model kodu
Kapının yürüttüğü gerçek kaynak
tam Rust öğesiL4627–L4667
kernel/src/task/scheduler.rs::insert_cap_to_current
/// M5 — En ergonomik helper: Mevcut task'in CNode'una bir capability ekler.
/// Grant verildikten hemen sonra çağrılması önerilir. Dönen değer (slot, generation).
///
/// Örnek:
/// ```ignore
/// let grant_id = grant_framebuffer(...)?;
/// let (slot, gen) = insert_cap_to_current(grant_id)?;
/// ```
pub fn insert_cap_to_current(
cap_id: crate::ui::capability::CapId,
) -> Result<(usize, u64), &'static str> {
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
let irq_guard = crate::arch::aarch64::IrqGuard::new();
let current_owner = current_task_id().unwrap_or(0);
// Geçiş dönemi uyumluluğu için basit dummy Capability
let dummy = crate::ui::capability::Capability::new(
cap_id,
1,
crate::ui::capability::CapabilityRights::FULL,
crate::ui::capability::CapabilityKind::Framebuffer,
current_owner,
None,
);
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
let s332_writer_access = crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s332_current_capability_insert_writer_guard_integration::acquire_s332_production_scheduler_writer_access()
.unwrap_or_else(|error| panic!("S332 current-capability-insert scheduler writer guard failed closed: {:?}", error));
let result = unsafe {
let sched = &mut *core::ptr::addr_of_mut!(SCHEDULER);
if let Some(ref mut task) = sched.current_task {
task.cnode.insert(dummy)
} else {
Err("No current task")
}
};
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s332_writer_access);
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(irq_guard);
result
}snippet sha256: 21976c7f5892…file sha256: 838dd474448c…
02 · Ortak exclusion üyeliği
S247 production writer guard
tam Rust öğesiL142–L153
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s332_current_capability_insert_writer_guard_integration.rs::acquire_s332_production_scheduler_writer_access
/// Acquire from the exact static gate used by routed readers and prior
/// writers. The caller must mask local IRQs before deriving CPU identity.
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
pub fn acquire_s332_production_scheduler_writer_access(
) -> Result<G8lS332ProductionSchedulerWriterAccess, G8lS247WholeSchedulerAccessError> {
let caller_cpu =
crate::percpu::try_current_cpu_id().ok_or(G8lS247WholeSchedulerAccessError::InvalidCpu)?;
let access = crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s246_whole_scheduler_read_access_guard::S247_PRODUCTION_WHOLE_SCHEDULER_ACCESS_GATE
.try_acquire_exclusive_for_valid_cpu(caller_cpu)?;
Ok(G8lS332ProductionSchedulerWriterAccess { _access: access })
}snippet sha256: b13d82e9e9bf…file sha256: 0301d63d49ef…
03 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam Rust öğesiL213–L225
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s332_current_capability_insert_writer_guard_integration.rs::target_function_contains_one_scheduler_writer_one_guard_and_one_insert
#[test]
fn target_function_contains_one_scheduler_writer_one_guard_and_one_insert() {
let target = current_capability_insert_boundary();
assert_eq!(target.matches("addr_of_mut!(SCHEDULER)").count(), 1);
assert_eq!(
target
.matches("acquire_s332_production_scheduler_writer_access()")
.count(),
1
);
assert_eq!(target.matches("task.cnode.insert(dummy)").count(), 1);
}snippet sha256: d81d77f4955a…file sha256: 3950ff7db53a…
04 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL14425–L14479
website/src/lib/operations.ts::g8l-s332-current-capability-insert-writer-guard-integration-partial
{
id: "g8l-s332-current-capability-insert-writer-guard-integration-partial",
date: "2026-08-27",
sequence: 332,
status: "passed",
umbrella_status: "partial",
title:
"S332 · Current-capability insert production writer guard integration",
summary:
"S332, legacy-compatible insert_cap_to_current içindeki gerçek mutable SCHEDULER yolunu nesting-safe local IRQ guard altında S247 ortak state word'üne bağlar. current_task_id owner snapshot'ının reader membership'i writer acquire'dan önce biter; aynı snapshot ile kurulan legacy Framebuffer capability, tek mutable alias ve CNode insert commit'i writer lease içinde kalır. Guarded writer 5/69, açık writer 64 ve provider authority 0'dır. S245 request tüketilmez, S244 admission üretilmez.",
evidence: [
"Focused current-capability-insert writer-integration kapısı iki bağımsız koşuda 22/22 PASS: 137 B / SHA-256 4ab22a54b548bb2ea63bc6bcd37322b805a2b858520fdf9f28d6b2cc9f60d06d.",
"Aynı S247 state word üzerinde CPU0–CPU3 writer membership, reader→writer ve writer→reader exclusion, invalid-CPU pre-callback rejection, exact-once commit-error release ve S331→S332 token monotonluğu doğrulandı; tarihsel S328 girişi CPU1-only kaldı.",
"Production kaynak sırası nested IrqGuard → current_task_id owned owner snapshot/read release → legacy Capability construction → acquire_s332 writer → mutable alias → current-task CNode insert → writer drop → nested IRQ restore olarak kilitlendi. Endpoint/notification registry veya IPC transaction açılmadı.",
"QEMU, RPi4, RPi5 ve RPi5+SMP AArch64 compile profilleri exit 0 verdi; warning header'ları 292/390/1116/1116, zero-warning iddiası yoktur.",
"Operations komut haritasından türetilen S238–S332 matrisi iki bağımsız koşuda 96 grup / 1394/1394 PASS; süre-normalize çıktılar 12528 B / SHA-256 cb89358ef97ec704338faed10e9b3937aecaa4f6031f1b6d567721d07bfb55bc ile byte-eşittir.",
"Exact yedi tarihsel G8h assertion adı dışlanıp kayıtlı --test-threads=1 kabulü kullanıldığında tam workspace iki koşuda 294 sonuç grubu / 3215 PASS / 0 fail / 7 filtered verdi; süre-normalize sonuç özetleri 28105 B / SHA-256 8c23285cb19d334402f262dc95d0795c5478882dc388542e0ec3eaf182857ad0 ile byte-eşittir. Filtresiz seri audit yalnız frozen S96 exceptions.S identity kapısında RED kaldığı için global workspace GREEN iddia edilmez.",
"S331'de gözlenen iki default-parallel PTY sapması seri S332 kabulüne katılmadı; default-parallel PTY determinism'i açık sınır olarak taşınır.",
"make verify-qemu iki bağımsız PASS verdi: strict ELF W^X 31/31 ve aynı 1551 B / SHA-256 527ef12c2bc56140e14e13be445f78c8e38872febc9849afcfacd499238ff966 smoke özeti korundu. Bu ortak regresyon board-rpi5-only S332 writer invocation kanıtı değildir.",
"Yerel website 510/510 test ile PASS; lint, boş çıktılı TypeScript kontrolü ve 23/23 static route ayrıca geçti. Static çıktı 193 dosyadır; S332 kaydı yereldir ve deployment yapılmadı.",
"S245 request ve S244 admission dokunulmadan kalır; production provider authority=0, whole-scheduler exclusion=false ve 64 production writer açık kalır.",
"Fiziksel/device işlem yapılmadı: physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S332=NO.",
],
commands: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s332_current_capability_insert_writer_guard_integration -- --test-threads=1",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5,smp",
"cargo test --workspace --quiet -- --test-threads=1 [seven exact historical --skip filters]",
],
terminalSessions: [
{
id: "g8l-s332-current-capability-insert-writer-guard-integration",
title: "G8l S332 current-capability insert writer guard integration",
commandLines: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s332_current_capability_insert_writer_guard_integration -- --test-threads=1",
],
outputLines: [
"test result: ok; S332 focused 1 group / 22 passed; 0 failed",
"shared S247 gate: 44 guarded readers + 5/69 guarded writers; 64 writers open",
"owned current-task snapshot precedes writer; provider authority=0",
],
exitCode: 0,
outputMode: "complete",
},
],
terminalSessionsNote:
"S332 beşinci production writer'ın kaynak entegrasyonudur; desteklenen RPi5 üzerinde runtime/cihaz gözlemi yapılmadı ve global exclusion oluşmadı.",
limitations: [
"64 production writer aynı shared gate dışında kaldığı için whole-scheduler exclusion ve provider authority açık kalır.",
"Legacy helper yalnız current-task owner snapshot'ını ve CNode insert'i kapsar; typed endpoint/notification transaction authority'si üretmez.",
"Default-parallel PTY determinism'i S331'den açık taşınır; kayıtlı seri kabul geçti.",
"Supported-profile runtime gözlemi, Generic SMP ve fiziksel RPi kabulü açık kalır.",
"Yerel web doğrulaması deployment değildir; canlı site bu değişiklikle güncellenmemiştir.",
],
},snippet sha256: 3cc1c6d89568…file sha256: 9726dbf00f84…
Focused test komutu
cargo test -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s332_current_capability_insert_writer_guard_integration -- --test-threads=1proof: docs/M8.1-RPi5-G8l-S332-Current-Capability-Insert-Writer-Guard-Integration-Proof.md
Registry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06