Open
Description
This is a tracking issue for the LLVM Control Flow Integrity (CFI) Support for Rust project (see the design document).
Steps
LLVM CFI support for Rust work will be implemented in these steps:
- Add option to the Rust compiler driver and frontend. (Add LLVM CFI support to the Rust compiler #89652)
- Add support for emitting type metadata and checks to the Rust compiler code generation. (Add LLVM CFI support to the Rust compiler #89652)
- Implement Rust-compiled code only LLVM CFI support by using Rust-specific type metadata identifiers. (Add LLVM CFI support to the Rust compiler #89652, Add fine-grained LLVM CFI support to the Rust compiler #95548)
- Define type metadata identifiers for cross-language LLVM CFI support. (See the design document.)
- Change initial implementation to use the defined type metadata identifiers for cross-language LLVM CFI support. (Add fine-grained LLVM CFI support to the Rust compiler #95548, RFC: Improve C types for cross-language LLVM CFI support rfcs#3296, Add cross-language LLVM CFI support to the Rust compiler #105452)
- Create documentation and tests. (Add LLVM CFI support to the Rust compiler #89652, Add documentation for LLVM CFI support rustc-dev-guide#1234, Add fine-grained LLVM CFI support to the Rust compiler #95548, Add cross-language LLVM CFI support to the Rust compiler #105452)
Unresolved Questions
- Should integers always be normalized?
Implementation history
- Add LLVM CFI support to the Rust compiler #89652
- Add documentation for LLVM CFI support rustc-dev-guide#1234
- Add fine-grained LLVM CFI support to the Rust compiler #95548
- RFC: Improve C types for cross-language LLVM CFI support rfcs#3296
[LLVM] Add CFI integer types normalization to Clang compiler
- Add cross-language LLVM CFI support to the Rust compiler #105452
Bonus implementation
- Add LLVM KCFI support to the Rust compiler #105109
- Add documentation for LLVM KCFI support rustc-dev-guide#1529