2026-03-24 13:40:39 +00:00

2.7 KiB

PR-5.4 — Verifier Integration for Syscall Slot Rules

Briefing

The verifier must ensure that syscall calls respect argument and return slot counts before runtime.

Target

  • Extend verifier to validate syscall usage.

Work items

  • At syscall call sites:

    • Look up SyscallMeta.
    • Ensure enough argument slots are available.
    • Ensure stack shape after call matches ret_slots.
  • Emit verifier errors for mismatches.

Acceptance checklist

  • Verifier rejects incorrect syscall slot usage.
  • Correct programs pass.
  • Runtime traps are not required for verifier-detectable cases.
  • cargo test passes.

Tests

  • Add tests:

    • Too few args for syscall → verifier error.
    • Correct args/returns → passes.

Junie instructions

You MAY:

  • Extend verifier with syscall checks.

You MUST NOT:

  • Change runtime trap logic.
  • Add new trap categories.

If unclear:

  • Ask before enforcing slot rules.

PR-5.5 — Remove Legacy Syscall Entry Paths

Briefing

Any old or experimental syscall entry paths must be removed so that the slot-based ABI is the only supported mechanism.

Target

  • Ensure only the new unified syscall dispatch path exists.

Work items

  • Search for legacy or alternate syscall invocation logic.
  • Remove or refactor them to use the canonical dispatch.
  • Update modules and exports accordingly.

Acceptance checklist

  • Only one syscall dispatch path remains.
  • No legacy syscall logic is present.
  • cargo test passes.

Tests

  • Existing tests only.

Junie instructions

You MAY:

  • Remove legacy syscall code paths.
  • Refactor callers to use the unified dispatch.

You MUST NOT:

  • Introduce new syscall semantics.
  • Keep compatibility shims.

If unclear:

  • Ask before deleting anything that looks externally visible.

PR-5.6 — Syscall Multi-Return Tests

Briefing

We must ensure multi-return syscalls behave correctly with the slot-based ABI.

Target

  • Add deterministic tests covering multi-return behavior.

Work items

  • Create or adapt at least one syscall with ret_slots > 1.

  • Add tests:

    • Verify correct stack results after syscall.
    • Verify incorrect caller expectations fail verification.

Acceptance checklist

  • Multi-return syscalls behave correctly.
  • Verifier catches mismatches.
  • cargo test passes.

Tests

  • New multi-return syscall tests.

Junie instructions

You MAY:

  • Add deterministic tests.
  • Use existing syscalls or create a simple test-only syscall.

You MUST NOT:

  • Modify syscall semantics to satisfy tests.
  • Add nondeterministic behavior.

If unclear:

  • Ask before introducing new test syscalls.