ASELSANMicrokernel
S302 · SOURCE-BOUND GATE EVIDENCE

G8l: EL0 IPC-reply writer-authority audit

Operations --test hedefi → test hedefiyle aynı adlı uygulama/model modülü → kaynak kesiti Bu sayfa yalnız S302 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.

S302Focused kod testiOperations id exactsource SHA exacttest target exact

operation: g8l-s302-el0-ipc-reply-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 öğesiL27–L94
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s302_el0_ipc_reply_writer_authority_audit.rs::S302_WHOLE_SCHEDULER_GUARDED_SITES
pub const S302_EXCEPTIONS_EXPLICIT_WRITER_SITES: usize = 8;
pub const S302_EXCEPTIONS_REMAINING_UNAUDITED_WRITER_SITES: usize = 7;
pub const S302_DIRECT_SCHEDULER_ACCESS_SITES: usize = S301_DIRECT_SCHEDULER_ACCESS_SITES;
pub const S302_IMMUTABLE_READ_SITES: usize = S301_IMMUTABLE_READ_SITES;
pub const S302_WHOLE_SCHEDULER_GUARDED_SITES: usize = S301_WHOLE_SCHEDULER_GUARDED_SITES;
pub const S302_WHOLE_SCHEDULER_UNROUTED_SITES: usize = S301_WHOLE_SCHEDULER_UNROUTED_SITES;
pub const S302_OPEN_WRITER_SITES: usize = S301_OPEN_WRITER_SITES;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS302SchedulerWriterAuthorityAuditOutcome {
    Idle,
    AwaitingWriterAuthority {
        request_id: u64,
        guarded_sites: usize,
        writer_sites: usize,
    },
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS302SchedulerWriterAuthorityAuditError {
    S301(G8lS301SchedulerWriterAuthorityAuditError),
    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_s302_scheduler_writer_authority(
    caller_cpu: usize,
    request: Option<G8lS245WholeSchedulerExclusionAdmissionRequestView>,
) -> Result<G8lS302SchedulerWriterAuthorityAuditOutcome, G8lS302SchedulerWriterAuthorityAuditError>
{
    match preflight_s301_scheduler_writer_authority(caller_cpu, request)
        .map_err(G8lS302SchedulerWriterAuthorityAuditError::S301)?
    {
        G8lS301SchedulerWriterAuthorityAuditOutcome::Idle => {
            Ok(G8lS302SchedulerWriterAuthorityAuditOutcome::Idle)
        }
        G8lS301SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
            request_id,
            guarded_sites,
            writer_sites,
        } if guarded_sites == S302_WHOLE_SCHEDULER_GUARDED_SITES
            && writer_sites == S302_OPEN_WRITER_SITES =>
        {
            Ok(
                G8lS302SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
                    request_id,
                    guarded_sites,
                    writer_sites,
                },
            )
        }
        G8lS301SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
            guarded_sites,
            writer_sites: _,
            ..
        } => Err(
            G8lS302SchedulerWriterAuthorityAuditError::PriorCoverageDrift {
                guarded_sites,
                unrouted_sites: S302_DIRECT_SCHEDULER_ACCESS_SITES - guarded_sites,
            },
        ),
    }
}
snippet sha256: 519275311544file sha256: b84ebae8eff8
02 · Doğrulayan test kodu

Operations komutuna bağlı focused test

tam Rust öğesiL206–L222
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s302_el0_ipc_reply_writer_authority_audit.rs::s302_post_reply_bridge_failure_panics_fail_closed

#[test]
fn s302_post_reply_bridge_failure_panics_fail_closed() {
    let source = include_str!("../../kernel/src/arch/aarch64/exceptions.rs");
    let boundary = sys_ipc_reply_boundary(source);
    for required in [
        ".unwrap_or_else(|error|",
        "panic!(",
        "reply committed but runtime OOM broker bridge failed closed",
        "REPLY_DERIVED_BROKER_COMMIT=YES SESSION_CLOSE=AUTOMATIC",
    ] {
        assert!(
            boundary.contains(required),
            "missing S302 fail-closed bridge token: {required}"
        );
    }
}
snippet sha256: 4cb470569a48file sha256: e50e31cf34e5
03 · Kapı kimlik kaydı

Operations sıra, kimlik ve başlık bağı

tam Operations kaydıL16165–L16221
website/src/lib/operations.ts::g8l-s302-el0-ipc-reply-writer-authority-audit-partial
  {
    id: "g8l-s302-el0-ipc-reply-writer-authority-audit-partial",
    date: "2026-08-26",
    sequence: 302,
    status: "passed",
    umbrella_status: "partial",
    title: "G8l: EL0 IPC-reply writer-authority audit",
    summary:
      "S302 focused 15/15 PASS ile arch/aarch64/exceptions.rs içindeki kaynak sırasına göre son explicit mutable scheduler aliasını SYS_IPC_REPLY dalında doğrular. Runtime-OOM reply preflight writer'dan önce çalışır; ipc_reply_commit(reply_cap_id, reply_msg) exact forward edilir. Broker commit yalnız başarılı IPC sonucu ve exact preflight ile açılır, post-commit bridge hatası panic ile fail-closed kalır ve exact syscall sonucu terminal return öncesinde yayınlanır. Writer authority yalnız model gate'inin exclusive lease'iyle mümkündür; reader lease'i writer'ı açmaz. Production inventory 113 direct / 44 immutable guarded / 69 open writer olarak değişmez; exceptions.rs içindeki 8 explicit aliasın 7'si ayrıca açık kalır ve production exclusive wrapper, provider authority, whole-scheduler exclusion veya scheduler mutation üretilmez.",
    evidence: [
      "S302 focused kaynak/model kapısı iki bağımsız koşuda 15/15 PASS verdi: 130 B / SHA-256 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3.",
      "SYS_IPC_REPLY dalındaki tek addr_of_mut!(crate::task::scheduler::SCHEDULER) writer boundary'si audit edilir. preflight_runtime_oom_supervisor_reply mutasyondan önce gelir; scheduler.ipc_reply_commit(reply_cap_id, reply_msg) exact forward edilir, broker commit yalnız IpcError::Ok + Some(preflight) ile açılır, bridge hatası panic eder ve set_ipc_error(ctx, result) terminal return'den önce kalır. exceptions.rs 8 explicit writer / 7 remaining unaudited'dır.",
      "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. Bu host/model evidence'tır.",
      "S301 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 / d8381646, RPi4 149371 B / 703989d7, RPi5 415093 B / 1405a03d ve RPi5+SMP 415035 B / 91862186. Warning header'ları sırasıyla 291, 389, 857 ve 857'dir; zero-warning iddiası değildir.",
      "Birleşik board-rpi5,board-qemu özellikleri iki koşuda beklenen exit 101, 18590 B / 1a0b4ee5, 17 error ve 22 warning header ile fail-closed kaldı; S302 writer boundary'si iki board profilinin birlikte etkinleşmesini açmaz.",
      "S238–S302 dependency matrisi iki koşuda 66 grup / 914/914 PASS; ham loglar byte-equal 8502 B / 2b4596ebfe55c16bf803e800e82a4329a1d0f6d477ada23b10bcb5a0068dd3b9, süre-normalize özetler byte-equal 8634 B / 3ba73c6569d9083ce522262fc4fa309052dc7f10a91c1c5763887bd9d7c69f2f. Bu production writer-authority invocation kanıtı değildir.",
      "Ortak make verify-qemu iki koşuda PASS verdi: 116222 B / 57d128b0 ve 116139 B / 4f1e9041; W^X 31/31, S271 GRAPH_ABSENT=YES, RuntimePmm baseline, EL0 x4096, IPC 20/20, tek S142 containment ve SEC5 korunur. Bu ortak smoke S302 production writer invocation kanıtı değildir.",
      "Exact yedi tarihsel G8h assertion adıyla dışlandığında workspace iki koşuda 264 sonuç grubu / 2706 PASS / 7 filtered verdi: ham loglar 61804 B / 5dfd0759 ve b2bdc53e, süre-normalize 25489 B özet byte-equal / SHA-256 b609427060a9acccd3eab1f78ea3851724db297a1e40522c7d6bac8fa3c5621e. Filtresiz koşu exit 101, 57026 B / 7d5f545c ile frozen S96 exceptions.S identity kapısında RED kaldı; full-workspace GREEN iddia edilmez.",
      "S302 production exclusive wrapper, provider authority, whole-scheduler exclusion, QEMU runtime fixture veya scheduler mutation iddiası eklemez; physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S302=NO.",
    ],
    commands: [
      "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s302_el0_ipc_reply_writer_authority_audit -- --test-threads=1",
      "cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none",
      "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 --features board-rpi5",
      "make verify-qemu",
    ],
    terminalSessions: [
      {
        id: "g8l-s302-el0-ipc-reply-writer-authority-audit",
        title: "G8l S302 EL0 IPC-reply writer-authority audit",
        commandLines: [
          "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s302_el0_ipc_reply_writer_authority_audit -- --test-threads=1",
        ],
        outputLines: [
          "test result: ok; S302 focused 1 group / 15 passed; 0 failed",
          "repeat-stable quiet output: 130 B / 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3",
          "EL0 IPC-reply writer authority remains model-only: reader blocks exclusive lease; preflight, exact reply commit, success-only broker commit and terminal result ordering are source-audited while exceptions.rs retains 7 unaudited aliases and all 69 production writer sites remain open",
          "dependency: S238–S302 · 66 groups · 914/914 PASS; workspace: 264 groups · 2706 PASS · 7 historical filtered",
        ],
        exitCode: 0,
        outputMode: "selected",
      },
    ],
    terminalSessionsNote:
      "S302 kaynak/model fail-closed authority boundary'sidir; production writer guard/migration, QEMU fixture mutation ve fiziksel/device execution claim edilmez.",
    limitations: [
      "S302 exceptions.rs içindeki kaynak sırasına göre son explicit mutable scheduler aliasını audit eder; aynı source unit'te 7 alias 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–S302 dependency matrisi exact 66 grup / 914/914 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 runtime invocation, Generic SMP ve fiziksel RPi kabulü açık kalır; S302 physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S302=NO.",
    ],
  },
snippet sha256: 6872f33bc11bfile sha256: 9726dbf00f84
Focused test komutu
cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s302_el0_ipc_reply_writer_authority_audit -- --test-threads=1
proof: docs/M8.1-RPi5-G8l-S302-EL0-IPC-Reply-Writer-Authority-Audit-Proof.md
Registry schema v5 · generator website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06