Add CBMC target platform support#1199
Closed
tob-joe wants to merge 1 commit into
Closed
Conversation
Add explicit CBMC target platform selection for the proof infrastructure, including i386 Linux support with an i686 preprocessor and matching target-model flags. Add target compiler shims for goto-instrument, a target ABI canary proof, and the solver/proof configuration tweaks needed by the 32-bit ML-DSA suite. Verification: git diff --check; python3 -B -m py_compile scripts/tests proofs/cbmc/run-cbmc-proofs.py; ./scripts/tests cbmc --help target list; canary dry-runs for i386-linux, x86_64-linux, aarch64-linux, riscv64-linux, riscv32-linux, and ppc64le-linux; nix eval --raw .#devShells.aarch64-linux.cbmc32.drvPath. Signed-off-by: Joe Doyle <joseph.doyle@trailofbits.com> Co-authored-by: Codex <codex@openai.com>
Author
|
Superseded by #1200, which keeps the same patch content but uses contiguous machine-parseable commit trailers. |
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
i386-linux,x86_64-linux,aarch64-linux,riscv64-linux,riscv32-linux, andppc64le-linuxcbmc32Nix shell with the matching target compilersgoto-ccandgoto-instrumentsize_t,long, anduint64_twidthsTarget execution model
The CBMC proofs do not execute target binaries. No QEMU or binfmt is involved in these proof runs. The target compiler is used to build the GOTO program with matching headers/preprocessor definitions, and CBMC checks that program on the host under the selected target model.
The repository also has an
aarch64_becross shell, but this PR does not expose it as a CBMC target because this CBMC toolchain exposesarm64rather than a separate big-endian Arm64 model. The compiler and CBMC target model should agree before adding that lane.Verification
git diff --checkpython3 -B -m py_compile scripts/tests proofs/cbmc/run-cbmc-proofs.py./scripts/tests cbmc --help | rg -- '--cbmc-target|i386-linux|x86_64-linux|aarch64-linux|riscv64-linux|riscv32-linux|ppc64le-linux|native|ilp32'i386-linux,x86_64-linux,aarch64-linux,riscv64-linux,riscv32-linux, andppc64le-linuxnix eval --raw .#devShells.aarch64-linux.cbmc32.drvPathThis work was completed by Trail of Bits as part of the Patch The Planet project in collaboration with OpenAI. The issue was identified primarily by the Codex coding agent, and manually reviewed before submission.