S324 · SOURCE-BOUND GATE EVIDENCE
G8l: QEMU S138 stale-ACK writer-authority audit
Operations --test hedefi → test hedefiyle aynı adlı uygulama/model modülü → kaynak kesiti Bu sayfa yalnız S324 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S324Focused kod testiOperations id exactsource SHA exacttest target exact
operation: g8l-s324-qemu-s138-stale-ack-writer-authority-audit-partial
uygulama/model · focused test · Operations · 3 exact excerpt
sequence-bound=true · implementation-bound=true
01 · Testin bağlı olduğu uygulama/model kodu
Kapının yürüttüğü gerçek kaynak
tam Rust öğesiL29–L102
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s324_qemu_s138_stale_ack_writer_authority_audit.rs::S324_MAIN_REMAINING_UNAUDITED_WRITER_SITES
pub const S324_WRITER_BOUNDARY_SITES: usize = 1;
pub const S324_WRITER_AUTHORITY_SITES: usize = 0;
pub const S324_MAIN_EXPLICIT_WRITER_SITES: usize = 17;
pub const S324_MAIN_PREVIOUSLY_AUDITED_WRITER_SITES: usize = 14;
pub const S324_MAIN_REMAINING_UNAUDITED_WRITER_SITES: usize = 2;
pub const S324_S138_EXPLICIT_WRITER_SITES: usize = 2;
pub const S324_S138_REMAINING_UNAUDITED_WRITER_SITES: usize = 0;
pub const S324_DIRECT_SCHEDULER_ACCESS_SITES: usize = S323_DIRECT_SCHEDULER_ACCESS_SITES;
pub const S324_IMMUTABLE_READ_SITES: usize = S323_IMMUTABLE_READ_SITES;
pub const S324_WHOLE_SCHEDULER_GUARDED_SITES: usize = S323_WHOLE_SCHEDULER_GUARDED_SITES;
pub const S324_WHOLE_SCHEDULER_UNROUTED_SITES: usize = S323_WHOLE_SCHEDULER_UNROUTED_SITES;
pub const S324_OPEN_WRITER_SITES: usize = S323_OPEN_WRITER_SITES;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS324SchedulerWriterAuthorityAuditOutcome {
Idle,
AwaitingWriterAuthority {
request_id: u64,
guarded_sites: usize,
writer_sites: usize,
},
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS324SchedulerWriterAuthorityAuditError {
S323(G8lS323SchedulerWriterAuthorityAuditError),
S245(G8lS245ExclusionAdmissionRequestError),
PriorCoverageDrift {
guarded_sites: usize,
unrouted_sites: usize,
},
}
/// Revalidate the prior fail-closed authority boundary without taking
/// admission or constructing a production exclusive wrapper.
pub fn preflight_s324_scheduler_writer_authority(
caller_cpu: usize,
request: Option<G8lS245WholeSchedulerExclusionAdmissionRequestView>,
) -> Result<G8lS324SchedulerWriterAuthorityAuditOutcome, G8lS324SchedulerWriterAuthorityAuditError>
{
match preflight_s323_scheduler_writer_authority(caller_cpu, request)
.map_err(G8lS324SchedulerWriterAuthorityAuditError::S323)?
{
G8lS323SchedulerWriterAuthorityAuditOutcome::Idle => {
Ok(G8lS324SchedulerWriterAuthorityAuditOutcome::Idle)
}
G8lS323SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
request_id,
guarded_sites,
writer_sites,
} if guarded_sites == S324_WHOLE_SCHEDULER_GUARDED_SITES
&& writer_sites == S324_OPEN_WRITER_SITES =>
{
Ok(
G8lS324SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
request_id,
guarded_sites,
writer_sites,
},
)
}
G8lS323SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
guarded_sites,
writer_sites: _,
..
} => Err(
G8lS324SchedulerWriterAuthorityAuditError::PriorCoverageDrift {
guarded_sites,
unrouted_sites: S324_DIRECT_SCHEDULER_ACCESS_SITES - guarded_sites,
},
),
}
}snippet sha256: a015baf162e2…file sha256: 138133303386…
02 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam Rust öğesiL251–L276
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s324_qemu_s138_stale_ack_writer_authority_audit.rs::s324_helper_revalidates_kernel_caller_send_and_linked_reply_under_transaction
#[test]
fn s324_helper_revalidates_kernel_caller_send_and_linked_reply_under_transaction() {
let source = include_str!("../../kernel/src/task/scheduler.rs");
let helper = kernel_call_and_wait_boundary(source);
for required in [
"IrqGuard::new()",
"IPC_TRANSACTION_LOCK.lock()",
".filter(|task| !task.is_user)",
".filter(|task_id| *task_id != 0)",
"current_endpoint_authority_is_live(",
"CapabilityRights::ENDPOINT_SEND",
"ENDPOINT_REGISTRY.lock()",
"endpoint.id == target_endpoint && !endpoint.is_reply_cap",
"endpoint.id == reply_cap_id",
"endpoint.is_reply_cap",
"endpoint.owner == caller_task",
"endpoint.reply_target == Some(target_endpoint)",
"if !reply_is_linked",
] {
assert!(
helper.contains(required),
"missing S324 helper authority token: {required}"
);
}
}snippet sha256: 7fe04261174c…file sha256: 7cbecc3b0457…
03 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL14813–L14873
website/src/lib/operations.ts::g8l-s324-qemu-s138-stale-ack-writer-authority-audit-partial
{
id: "g8l-s324-qemu-s138-stale-ack-writer-authority-audit-partial",
date: "2026-08-27",
sequence: 324,
status: "passed",
umbrella_status: "partial",
title: "G8l: QEMU S138 stale-ACK writer-authority audit",
summary:
"S324 focused 15/15 PASS ile main.rs kaynak sırasındaki bir sonraki explicit mutable scheduler sınırını doğrular: qemu_s137_runtime_pressure_completion içindeki iki ipc_kernel_call_and_wait writer'ından daha önceki S138 stale-ACK CALL. Nonzero completion task, task-owned normal Endpoint SEND authority, strict EL0 supervisor RECV grant, coordinator event, immutable message ve linked stale reply writer'dan önce doğrulanır. Continuation exact stale label/badge, deliberately mismatched event id ve korunmuş message tail döndürür. Coordinator AckMismatch sonucu snapshot'ı değiştirmez ve monitor rearm AttemptInFlight ile fail-closed kalır; S323 exact reply bundan sonra mint edilir. Helper aynı IRQ/IPC transaction altında non-user caller SEND authority'sini, normal endpoint'i, linked reply'ı, optional receiver authority/deadline'ını ve tüm park kapasitesini yeniden doğrular; CALL publication/park ve optional delivery tek transaction içindedir. Writer authority yalnız model gate'inin exclusive lease'iyle mümkündür; reader lease'i writer'ı açmaz. main.rs 17 explicit writer / 14 previously audited / 2 remaining unaudited; S138 işlevi 2 / 0 ve tüm S138 aliasları source/model covered; production inventory 113 direct / 44 immutable guarded / 69 open writer olarak değişmez ve production exclusive wrapper, provider authority, whole-scheduler exclusion veya scheduler mutation üretilmez.",
evidence: [
"S324 focused kaynak/model kapısı iki bağımsız koşuda 15/15 PASS verdi: 130 B / SHA-256 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3.",
"main.rs içindeki 17 explicit addr_of_mut!(crate::task::scheduler::SCHEDULER) sitesinin positions[2], kaynakta alttan on beşinci sınırı audit edilir. qemu_s137_runtime_pressure_completion içindeki daha önceki stale-ACK CALL kapanır; S138 işlevinde 0, main.rs genelinde 2 unaudited alias kalır.",
"Nonzero completion task, task-owned normal Endpoint ENDPOINT_SEND authority, strict EL0 supervisor'a exact ENDPOINT_RECV grant, coordinator event, immutable IpcMessage ve completion-owned linked stale reply-cap writer'dan önce kurulur.",
"ipc_kernel_call_and_wait exact endpoint id/generation, stale reply id ve immutable event_message'i alır. Continuation yalnız exact stale label/badge, event.id+1 ve unchanged message tail ile kabul edilir.",
"Coordinator AckMismatch sonucu snapshot'ı değiştirmez ve monitor rearm AttemptInFlight ile fail-closed kalır. S323'te audit edilen exact reply mint ve exact-ACK CALL bunun ardından gelir.",
"Helper IrqGuard ve IPC_TRANSACTION_LOCK altında nonzero non-user caller, canlı SEND authority, normal endpoint, linked reply, optional receiver authority/deadline ve ready/blocked kapasiteyi yeniden doğrular; CALL publish/finish-park, caller BlockedOnIpc publication ve optional delivery/deadline retirement/Ready enqueue aynı transaction içindedir.",
"Model gate reader membership exclusive writer authority'yi ExclusiveBusy ile bloklar; reader bırakıldıktan sonra non-zero token'lı exclusive lease alınır. Wrong CPU InvalidCpu ile fail-closed kalır. Bu host/model evidence'tır.",
"S323 authority preflight yeniden doğrulanır; pending S245 request korunur ve sonuç AwaitingWriterAuthority { guarded_sites: 44, writer_sites: 69 } olarak döner.",
"Dört AArch64 profil derlemesi iki koşuda byte-equal exit 0 verdi: QEMU 110646 B / a2851fca, RPi4 149371 B / 6402b81b, RPi5 486427 B / 5c32fca6 ve RPi5+SMP 486369 B / 99c29c5b. Warning header'ları sırasıyla 291, 389, 1055 ve 1055'tir; zero-warning iddiası değildir.",
"Birleşik board-rpi5,board-qemu özellikleri iki koşuda beklenen exit 101, 18624 B / 91066a69, 17 error ve 22 warning header ile fail-closed kaldı.",
"S238–S324 dependency matrisi iki koşuda 88 grup / 1244/1244 PASS; ham loglar 11362 B / 8e381de7 ve 80821536, süre-normalize çıktılar byte-equal 11538 B / b894d6d2df3ff30f08233213e26cbcd114a292c55206a3d2eba199d57005a197. Önceki S323 prefix'i 11232 B / ef6e09ec ile birebir yeniden üretildi. Bu production writer-authority invocation kanıtı değildir.",
"Ortak make verify-qemu iki koşuda PASS verdi: 116222 B / 658c41ff ve 116139 B / 3e7ff7eb; guest logları 2140085 B / 0ebcdb9a ve 2101703 B / 639e1ae5. W^X 31/31, tek kontrollü S140 exit, S271 GRAPH_ABSENT=YES, RuntimePmm baseline, EL0 x4096, IPC 20/20, koşu başına tek beklenen S142 fatal containment, SEC5 ve 13 KERNEL_FAULTS=0 marker'ı korunur. Bu ortak smoke S324 production writer-authority invocation kanıtı değildir.",
"Exact yedi frozen tarihsel assertion dışlandığında tam workspace iki bağımsız koşuda 286 sonuç grubu / 3058 PASS / 7 filtered verdi. Ham loglar 64686 B / 70c3abbf ve 64686 B / 244eacde; süre-normalize sonuç özetleri byte-equal 27623 B / 60b005cb8a89db6d1136cdedfbaa179d739ec688c029101f53827640d48ce8df. Filtresiz workspace exit 101, 59908 B / 6a0063dc ile frozen S96 exceptions.S identity kapısında RED kaldı; full-workspace GREEN iddia edilmez.",
"S324 production exclusive wrapper, provider authority, whole-scheduler exclusion, QEMU fixture mutation veya scheduler mutation iddiası eklemez; physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S324=NO.",
],
commands: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s324_qemu_s138_stale_ack_writer_authority_audit -- --test-threads=1",
"cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-qemu",
"cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi4",
"cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
"cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5,smp",
"cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5,board-qemu",
"make verify-qemu",
],
terminalSessions: [
{
id: "g8l-s324-qemu-s138-stale-ack-writer-authority-audit",
title: "G8l S324 QEMU S138 stale-ACK writer-authority audit",
commandLines: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s324_qemu_s138_stale_ack_writer_authority_audit -- --test-threads=1",
],
outputLines: [
"test result: ok; S324 focused 1 group / 15 passed; 0 failed",
"repeat-stable quiet output: 130 B / 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3",
"QEMU S138 stale-ACK CALL writer authority remains model-only: exact stale envelope precedes nonmutating AckMismatch and blocked rearm; both S138 aliases are source/model covered while main.rs retains 2 unaudited aliases and all 69 production writer sites remain open",
"dependency: S238–S324 · 88 groups · 1244/1244 PASS; workspace: 286 groups · 3058 PASS · 7 historical filtered; unfiltered frozen S96 RED",
],
exitCode: 0,
outputMode: "selected",
},
],
terminalSessionsNote:
"S324 kaynak/model fail-closed authority boundary'sidir; production writer guard/migration, QEMU fixture mutation ve fiziksel/device execution claim edilmez.",
limitations: [
"S324 qemu_s137_runtime_pressure_completion içindeki daha önceki stale-ACK ipc_kernel_call_and_wait mutable scheduler aliasını audit eder; main.rs genelinde 2 ve toplam 69 production writer site authority wrapper dışında açık kalır.",
"Exclusive lease yalnız host/model gate'inde test edilir; production exclusive wrapper, provider authority ve whole-scheduler exclusion açık kalır.",
"S238–S324 dependency matrisi exact 88 grup / 1244/1244 PASS'tir; bu production writer authority invocation kanıtı değildir.",
"Filtresiz workspace frozen S96 identity kapısında RED'dir; workspace umbrella GREEN iddia edilmez.",
"Supported-profile writer-authority runtime invocation, Generic SMP ve fiziksel RPi kabulü açık kalır; S324 physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S324=NO.",
],
},snippet sha256: c52c4972a9e6…file sha256: 9726dbf00f84…
Focused test komutu
cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s324_qemu_s138_stale_ack_writer_authority_audit -- --test-threads=1proof: docs/M8.1-RPi5-G8l-S324-QEMU-S138-Stale-Ack-Writer-Authority-Audit-Proof.md
Registry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06