ASELSANMicrokernel
S303 · SOURCE-BOUND GATE EVIDENCE

G8l: EL0 IPC-receive writer-authority audit

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

S303Focused kod testiOperations id exactsource SHA exacttest target exact

operation: g8l-s303-el0-ipc-receive-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 öğesiL26–L93
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s303_el0_ipc_receive_writer_authority_audit.rs::S303_WHOLE_SCHEDULER_GUARDED_SITES
pub const S303_EXCEPTIONS_EXPLICIT_WRITER_SITES: usize = 8;
pub const S303_EXCEPTIONS_REMAINING_UNAUDITED_WRITER_SITES: usize = 6;
pub const S303_DIRECT_SCHEDULER_ACCESS_SITES: usize = S302_DIRECT_SCHEDULER_ACCESS_SITES;
pub const S303_IMMUTABLE_READ_SITES: usize = S302_IMMUTABLE_READ_SITES;
pub const S303_WHOLE_SCHEDULER_GUARDED_SITES: usize = S302_WHOLE_SCHEDULER_GUARDED_SITES;
pub const S303_WHOLE_SCHEDULER_UNROUTED_SITES: usize = S302_WHOLE_SCHEDULER_UNROUTED_SITES;
pub const S303_OPEN_WRITER_SITES: usize = S302_OPEN_WRITER_SITES;

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

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS303SchedulerWriterAuthorityAuditError {
    S302(G8lS302SchedulerWriterAuthorityAuditError),
    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_s303_scheduler_writer_authority(
    caller_cpu: usize,
    request: Option<G8lS245WholeSchedulerExclusionAdmissionRequestView>,
) -> Result<G8lS303SchedulerWriterAuthorityAuditOutcome, G8lS303SchedulerWriterAuthorityAuditError>
{
    match preflight_s302_scheduler_writer_authority(caller_cpu, request)
        .map_err(G8lS303SchedulerWriterAuthorityAuditError::S302)?
    {
        G8lS302SchedulerWriterAuthorityAuditOutcome::Idle => {
            Ok(G8lS303SchedulerWriterAuthorityAuditOutcome::Idle)
        }
        G8lS302SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
            request_id,
            guarded_sites,
            writer_sites,
        } if guarded_sites == S303_WHOLE_SCHEDULER_GUARDED_SITES
            && writer_sites == S303_OPEN_WRITER_SITES =>
        {
            Ok(
                G8lS303SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
                    request_id,
                    guarded_sites,
                    writer_sites,
                },
            )
        }
        G8lS302SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
            guarded_sites,
            writer_sites: _,
            ..
        } => Err(
            G8lS303SchedulerWriterAuthorityAuditError::PriorCoverageDrift {
                guarded_sites,
                unrouted_sites: S303_DIRECT_SCHEDULER_ACCESS_SITES - guarded_sites,
            },
        ),
    }
}
snippet sha256: fa41dd94d3b4file sha256: 501361258a9c
02 · Doğrulayan test kodu

Operations komutuna bağlı focused test

tam Rust öğesiL204–L227
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s303_el0_ipc_receive_writer_authority_audit.rs::s303_immediate_receive_publishes_exact_envelope_and_reply_capability

#[test]
fn s303_immediate_receive_publishes_exact_envelope_and_reply_capability() {
    let source = include_str!("../../kernel/src/arch/aarch64/exceptions.rs");
    let boundary = sys_ipc_recv_boundary(source);
    for required in [
        "Ok(Some(envelope))",
        "set_ipc_message_result(ctx, envelope.message, envelope.reply_cap_id)",
        "return;",
    ] {
        assert!(
            boundary.contains(required),
            "missing S303 immediate-receive token: {required}"
        );
    }
    let writer = boundary
        .find("scheduler.ipc_recv_or_park(ctx, user_sp, ep_id, endpoint_generation)")
        .unwrap();
    let immediate = boundary.find("Ok(Some(envelope))").unwrap();
    let publish = boundary
        .find("set_ipc_message_result(ctx, envelope.message, envelope.reply_cap_id)")
        .unwrap();
    assert!(writer < immediate && immediate < publish);
}
snippet sha256: a6cc5dfe39d9file sha256: 152833e9528e
03 · Kapı kimlik kaydı

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

tam Operations kaydıL16108–L16164
website/src/lib/operations.ts::g8l-s303-el0-ipc-receive-writer-authority-audit-partial
  {
    id: "g8l-s303-el0-ipc-receive-writer-authority-audit-partial",
    date: "2026-08-26",
    sequence: 303,
    status: "passed",
    umbrella_status: "partial",
    title: "G8l: EL0 IPC-receive writer-authority audit",
    summary:
      "S303 focused 15/15 PASS ile arch/aarch64/exceptions.rs içindeki kaynak sırasına göre sondan ikinci explicit mutable scheduler aliasını SYS_IPC_RECV dalında doğrular. Canlı Endpoint CNode authority ve generation ile ENDPOINT_RECV hakkı writer'dan önce denetlenir; ipc_recv_or_park(ctx, user_sp, ep_id, endpoint_generation) exact forward edilir. Immediate envelope/reply-cap publication, parked continuation dönüşü ve terminal error publication birbirinden ayrıdı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 6'sı ayrıca açık kalır ve production exclusive wrapper, provider authority, whole-scheduler exclusion veya scheduler mutation üretilmez.",
    evidence: [
      "S303 focused kaynak/model kapısı iki bağımsız koşuda 15/15 PASS verdi: 130 B / SHA-256 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3.",
      "SYS_IPC_RECV dalındaki tek addr_of_mut!(crate::task::scheduler::SCHEDULER) writer boundary'si audit edilir. current_task_cnode Endpoint lookup, generation ve ENDPOINT_RECV hakkı mutasyondan önce gelir; scheduler.ipc_recv_or_park(ctx, user_sp, ep_id, endpoint_generation) exact forward edilir. Ok(Some(envelope)) exact message/reply-cap yayınlar, Ok(None) parked continuation olarak döner, Err(error) terminal IPC sonucu yayınlar. exceptions.rs 8 explicit writer / 6 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.",
      "S302 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 / 86161e35, RPi4 149371 B / f0564a94, RPi5 417531 B / f9fa1fbf ve RPi5+SMP 417473 B / ad95c4d6. Warning header'ları sırasıyla 291, 389, 864 ve 864'tür; zero-warning iddiası değildir.",
      "Birleşik board-rpi5,board-qemu özellikleri iki koşuda beklenen exit 101, 18590 B / 2b606c09, 17 error ve 22 warning header ile fail-closed kaldı; S303 writer boundary'si iki board profilinin birlikte etkinleşmesini açmaz.",
      "S238–S303 dependency matrisi iki koşuda 67 grup / 929/929 PASS; ham loglar byte-equal 8632 B / fd47861da1e301c4e9b498aaac28ea55528acdccb54661d3ec2e842f7c6e7bc9, süre-normalize özetler byte-equal 8766 B / be75f1fc5155f4d1383fd19204b3afbc70f166f76add050f09b3292fbe95caf1. Bu production writer-authority invocation kanıtı değildir.",
      "Ortak make verify-qemu iki koşuda PASS verdi: 116222 B / bfacaeb5 ve 116139 B / b80e247b; W^X 31/31, S271 GRAPH_ABSENT=YES, RuntimePmm baseline, EL0 x4096, IPC 20/20, tek S142 containment ve SEC5 korunur. Bu ortak smoke S303 production writer invocation kanıtı değildir.",
      "Exact yedi tarihsel G8h assertion adıyla dışlandığında workspace iki koşuda 265 sonuç grubu / 2722 PASS / 7 filtered verdi: ham loglar 61935 B / 6dd3b6b1 ve b64a8d5c, süre-normalize 25586 B özet byte-equal / SHA-256 61c4effdf8404f30c3d718021cf1783ee353bbfd3dd7e7c2c320c762004922b2. Filtresiz koşu exit 101, 57157 B / 2cb77bdc ile frozen S96 exceptions.S identity kapısında RED kaldı; full-workspace GREEN iddia edilmez.",
      "S303 production exclusive wrapper, provider authority, whole-scheduler exclusion, QEMU runtime fixture veya scheduler mutation iddiası eklemez; physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S303=NO.",
    ],
    commands: [
      "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s303_el0_ipc_receive_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-s303-el0-ipc-receive-writer-authority-audit",
        title: "G8l S303 EL0 IPC-receive writer-authority audit",
        commandLines: [
          "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s303_el0_ipc_receive_writer_authority_audit -- --test-threads=1",
        ],
        outputLines: [
          "test result: ok; S303 focused 1 group / 15 passed; 0 failed",
          "repeat-stable quiet output: 130 B / 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3",
          "EL0 IPC-receive writer authority remains model-only: reader blocks exclusive lease; live Endpoint CNode/generation/RECV rights, exact receive-or-park forwarding and disjoint immediate/parked/error results are source-audited while exceptions.rs retains 6 unaudited aliases and all 69 production writer sites remain open",
          "dependency: S238–S303 · 67 groups · 929/929 PASS; workspace: 265 groups · 2722 PASS · 7 historical filtered",
        ],
        exitCode: 0,
        outputMode: "selected",
      },
    ],
    terminalSessionsNote:
      "S303 kaynak/model fail-closed authority boundary'sidir; production writer guard/migration, QEMU fixture mutation ve fiziksel/device execution claim edilmez.",
    limitations: [
      "S303 exceptions.rs içindeki kaynak sırasına göre sondan ikinci explicit mutable scheduler aliasını audit eder; aynı source unit'te 6 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–S303 dependency matrisi exact 67 grup / 929/929 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; S303 physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S303=NO.",
    ],
  },
snippet sha256: d72574105deefile sha256: 9726dbf00f84
Focused test komutu
cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s303_el0_ipc_receive_writer_authority_audit -- --test-threads=1
proof: docs/M8.1-RPi5-G8l-S303-EL0-IPC-Receive-Writer-Authority-Audit-Proof.md
Registry schema v5 · generator website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06