docs: binary safety checks design — ARM + RISC-V opt-in safety profiles#110
Merged
Conversation
Adds docs/binary-safety-design.md covering eight runtime-guard categories (memory bounds, divide-by-zero, signed-division overflow, stack overflow, CFI forward and backward edges, AAPCS prologue/epilogue invariants, linear-memory poisoning, and component-model type confusion) with a hardware-fast-path / software-fallback decision tree per check and a per-target support matrix for Cortex-M3..M85 and RV32I..RV32GC. Specifies a unified --safety profile CLI surface (none / fuzz / rtos / asil-d / paranoid) plus fine-grained --safety-X overrides, cross-references docs/spectre-policy.md for transient-execution coverage, and lays out a 5-phase roadmap including Rocq proof reparameterisation in Phase 5. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/binary-safety-design.md(842 lines) covering eight categories of opt-in runtime safety guards for synth's ARM Cortex-M and RISC-V RV32 targets.--safety <profile>CLI surface (none/fuzz/rtos/asil-d/paranoid) plus fine-grained--safety-bounds,--safety-stack,--safety-cfi-fwd,--safety-cfi-bwd,--safety-prologue,--safety-poison,--safety-cm-types,--safety-spectre-v1overrides.coq/Synth/Compilation.vbySafetyProfileso existing T1/T2 lemmas can be re-proven per profile.Checks covered
--bounds-checkflag.safe_lift_*family insynth-abi).Test plan
cargo build/cargo testunaffected.docs/spectre-policy.md(existing) anddocs/design/MEMORY_ARCHITECTURE.md(existing) — links verified to existing files.instruction_selector.rs,mpu.rs,pmp.rs) verified against current HEAD on main.Open questions for reviewers
The document lists 8 open questions in §6, including:
s10be reserved for a stack-limit pointer when--safety-bounds=soft?🤖 Generated with Claude Code