S322 · SOURCE-BOUND GATE EVIDENCE
G8l: QEMU S140 controlled pre-ACK-exit CALL writer-authority audit
Operations --test hedefi → test hedefiyle aynı adlı uygulama/model modülü → kaynak kesiti Bu sayfa yalnız S322 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S322Focused kod testiOperations id exactsource SHA exacttest target exact
operation: g8l-s322-qemu-s140-controlled-pre-ack-exit-call-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 öğesiL28–L101
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s322_qemu_s140_controlled_pre_ack_exit_call_writer_authority_audit.rs::S322_MAIN_REMAINING_UNAUDITED_WRITER_SITES
pub const S322_WRITER_BOUNDARY_SITES: usize = 1;
pub const S322_WRITER_AUTHORITY_SITES: usize = 0;
pub const S322_MAIN_EXPLICIT_WRITER_SITES: usize = 17;
pub const S322_MAIN_PREVIOUSLY_AUDITED_WRITER_SITES: usize = 12;
pub const S322_MAIN_REMAINING_UNAUDITED_WRITER_SITES: usize = 4;
pub const S322_S140_EXPLICIT_WRITER_SITES: usize = 2;
pub const S322_S140_REMAINING_UNAUDITED_WRITER_SITES: usize = 0;
pub const S322_DIRECT_SCHEDULER_ACCESS_SITES: usize = S321_DIRECT_SCHEDULER_ACCESS_SITES;
pub const S322_IMMUTABLE_READ_SITES: usize = S321_IMMUTABLE_READ_SITES;
pub const S322_WHOLE_SCHEDULER_GUARDED_SITES: usize = S321_WHOLE_SCHEDULER_GUARDED_SITES;
pub const S322_WHOLE_SCHEDULER_UNROUTED_SITES: usize = S321_WHOLE_SCHEDULER_UNROUTED_SITES;
pub const S322_OPEN_WRITER_SITES: usize = S321_OPEN_WRITER_SITES;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS322SchedulerWriterAuthorityAuditOutcome {
Idle,
AwaitingWriterAuthority {
request_id: u64,
guarded_sites: usize,
writer_sites: usize,
},
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS322SchedulerWriterAuthorityAuditError {
S321(G8lS321SchedulerWriterAuthorityAuditError),
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_s322_scheduler_writer_authority(
caller_cpu: usize,
request: Option<G8lS245WholeSchedulerExclusionAdmissionRequestView>,
) -> Result<G8lS322SchedulerWriterAuthorityAuditOutcome, G8lS322SchedulerWriterAuthorityAuditError>
{
match preflight_s321_scheduler_writer_authority(caller_cpu, request)
.map_err(G8lS322SchedulerWriterAuthorityAuditError::S321)?
{
G8lS321SchedulerWriterAuthorityAuditOutcome::Idle => {
Ok(G8lS322SchedulerWriterAuthorityAuditOutcome::Idle)
}
G8lS321SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
request_id,
guarded_sites,
writer_sites,
} if guarded_sites == S322_WHOLE_SCHEDULER_GUARDED_SITES
&& writer_sites == S322_OPEN_WRITER_SITES =>
{
Ok(
G8lS322SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
request_id,
guarded_sites,
writer_sites,
},
)
}
G8lS321SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
guarded_sites,
writer_sites: _,
..
} => Err(
G8lS322SchedulerWriterAuthorityAuditError::PriorCoverageDrift {
guarded_sites,
unrouted_sites: S322_DIRECT_SCHEDULER_ACCESS_SITES - guarded_sites,
},
),
}
}snippet sha256: 19097c68c741…file sha256: c67490d23d18…
02 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam Rust öğesiL211–L236
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s322_qemu_s140_controlled_pre_ack_exit_call_writer_authority_audit.rs::s322_helper_revalidates_kernel_caller_send_and_linked_reply_under_transaction
#[test]
fn s322_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 S322 helper authority token: {required}"
);
}
}snippet sha256: 1c6a73f7ebf5…file sha256: bba29b0fb038…
03 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL14935–L14995
website/src/lib/operations.ts::g8l-s322-qemu-s140-controlled-pre-ack-exit-call-writer-authority-audit-partial
{
id: "g8l-s322-qemu-s140-controlled-pre-ack-exit-call-writer-authority-audit-partial",
date: "2026-08-27",
sequence: 322,
status: "passed",
umbrella_status: "partial",
title: "G8l: QEMU S140 controlled pre-ACK-exit CALL writer-authority audit",
summary:
"S322 focused 15/15 PASS ile main.rs kaynak sırasındaki bir sonraki explicit mutable scheduler sınırını doğrular: run_qemu_s140_supervisor_recovery içindeki iki ipc_kernel_call_and_wait writer'ından daha önceki controlled pre-ACK-exit CALL. Nonzero controller, controller-owned normal Endpoint SEND authority, task-bound broker session/lease, strict EL0 controlled-exit supervisor RECV grant, immutable message ve linked cancelled reply writer'dan önce doğrulanır. 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. Controlled task exit cancelled reply'ı retire eder ve aynı controller'ı yalnız exact InvalidCapability ile resume eder; crashed supervisor reclaim, explicit broker recovery ve old-lease StaleLease sonucu daha sonraki S321 replacement CALL'den önce gelir. 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 / 12 previously audited / 4 remaining unaudited; S140 işlevi 2 / 0 ve tüm S140 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: [
"S322 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[4], kaynakta alttan on üçüncü sınırı audit edilir. run_qemu_s140_supervisor_recovery içindeki daha önceki controlled pre-ACK-exit CALL kapanır; S140 işlevinde 0, main.rs genelinde 4 unaudited alias kalır.",
"Nonzero controller, controller-owned normal Endpoint ENDPOINT_SEND authority, task-bound broker session/lease, strict EL0 controlled-exit supervisor'a exact ENDPOINT_RECV grant, immutable IpcMessage ve controller-owned linked one-shot cancelled reply-cap writer'dan önce kurulur.",
"ipc_kernel_call_and_wait exact endpoint id/generation, cancelled reply id ve immutable message'i alır. 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.",
"Transaction bırakıldıktan sonra aynı kernel caller saved GPR continuation'ından resume edilir ve yalnız exact InvalidCapability kabul edilir. Cancelled reply registry'den kaldırılmıştır; crashed supervisor exact reclaim ile RuntimePmm baseline'a döner, broker.recover_supervisor_session exact lease'i pending kuyruğuna alır, recovered pending=1/in_flight=0/crashes=1/recovered_inflight=1 olur ve old lease StaleLease verir. Bunların tümü daha sonraki S321 replacement writer'dan önce gelir.",
"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.",
"S321 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 / 9a79c21f, RPi4 149371 B / 6ea07a36, RPi5 479399 B / b9960a47 ve RPi5+SMP 479341 B / 5beb5e22. Warning header'ları sırasıyla 291, 389, 1035 ve 1035'tir; zero-warning iddiası değildir.",
"Birleşik board-rpi5,board-qemu özellikleri iki koşuda beklenen exit 101, 18624 B / 6157f609, 17 error ve 22 warning header ile fail-closed kaldı.",
"S238–S322 dependency matrisi iki koşuda 86 grup / 1214/1214 PASS; ham loglar byte-equal 11102 B / 6ea53ba4, süre-normalize özetler byte-equal 11274 B / 0f153ae985f116ec1ee7a1da68f9efb7c4ea8f544330ff9070238b19f1b321bb. Bu production writer-authority invocation kanıtı değildir.",
"Ortak make verify-qemu iki koşuda PASS verdi: 116222 B / d957dced ve 116139 B / 14b47fd7; guest logları 2115542 B / bb06cb53 ve 2138348 B / 5e9c6aee. 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 S322 production writer-authority invocation kanıtı değildir.",
"Exact yedi tarihsel G8h assertion adıyla dışlandığında workspace iki koşuda 284 sonuç grubu / 3026 PASS / 7 filtered verdi: ham loglar 344210 B / 36bb5e1d ve 344120 B / 8a1e5c2d, sonuç özetleri 26863 B / 2cabb0d1 ve 392263c9, süre-normalize 27429 B özet byte-equal / SHA-256 8e4339f4f7dcdc155544bef4a09e00883f43070b94894415edd7a749de5d3996. Filtresiz koşu exit 101, 312560 B / 684030a6 ile frozen S96 exceptions.S identity kapısında RED kaldı; full-workspace GREEN iddia edilmez.",
"S322 production exclusive wrapper, provider authority, whole-scheduler exclusion, QEMU fixture mutation veya scheduler mutation iddiası eklemez; physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S322=NO.",
],
commands: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s322_qemu_s140_controlled_pre_ack_exit_call_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-s322-qemu-s140-controlled-pre-ack-exit-call-writer-authority-audit",
title:
"G8l S322 QEMU S140 controlled pre-ACK-exit CALL writer-authority audit",
commandLines: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s322_qemu_s140_controlled_pre_ack_exit_call_writer_authority_audit -- --test-threads=1",
],
outputLines: [
"test result: ok; S322 focused 1 group / 15 passed; 0 failed",
"repeat-stable quiet output: 130 B / 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3",
"QEMU S140 controlled pre-ACK-exit CALL writer authority remains model-only: exact InvalidCapability, reply retirement, reclaim/recovery/staleness precede the replacement call; all S140 aliases are source/model covered, main.rs retains 4 unaudited aliases and all 69 production writer sites remain open",
"dependency: S238–S322 · 86 groups · 1214/1214 PASS; workspace: 284 groups · 3026 PASS · 7 historical filtered",
],
exitCode: 0,
outputMode: "selected",
},
],
terminalSessionsNote:
"S322 kaynak/model fail-closed authority boundary'sidir; production writer guard/migration, QEMU fixture mutation ve fiziksel/device execution claim edilmez.",
limitations: [
"S322 run_qemu_s140_supervisor_recovery içindeki daha önceki controlled pre-ACK-exit ipc_kernel_call_and_wait mutable scheduler aliasını audit eder; S140 kaynak/model düzeyinde kapanırken main.rs genelinde 4 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–S322 dependency matrisi exact 86 grup / 1214/1214 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; S322 physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S322=NO.",
],
},snippet sha256: 808f68ccd4ee…file sha256: 9726dbf00f84…
Focused test komutu
cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s322_qemu_s140_controlled_pre_ack_exit_call_writer_authority_audit -- --test-threads=1proof: docs/M8.1-RPi5-G8l-S322-QEMU-S140-Controlled-Pre-Ack-Exit-Call-Writer-Authority-Audit-Proof.md
Registry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06