File tree 2 files changed +42
-0
lines changed
2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,27 @@ for network parsing.
86
86
87
87
[ simd-layout ] : https://rust-lang.github.io/unsafe-code-guidelines/layout/packed-simd-vectors.html
88
88
89
+ ## Security Ethos
90
+
91
+ Zerocopy is expressly designed for use in security-critical contexts. We
92
+ strive to ensure that that zerocopy code is sound under Rust's current
93
+ memory model, and * any future memory model* . We ensure this by:
94
+ - ** ...not 'guessing' about Rust's semantics.**
95
+ We annotate ` unsafe ` code with a precise rationale for its soundness that
96
+ cites a relevant section of Rust's official documentation. When Rust's
97
+ documented semantics are unclear, we work with the Rust Operational
98
+ Semantics Team to clarify Rust's documentation.
99
+ - ** ...rigorously testing our implementation.**
100
+ We run tests using [ Miri] , ensuring that zerocopy is sound across a wide
101
+ array of supported target platforms of varying endianness and pointer
102
+ width, and across both current and experimental memory models of Rust.
103
+ - ** ...formally proving the correctness of our implementation.**
104
+ We apply formal verification tools like [ Kani] [ kani ] to prove zerocopy's
105
+ correctness.
106
+
107
+ [ Miri ] : https://github.com/rust-lang/miri
108
+ [ Kani ] : https://github.com/model-checking/kani
109
+
89
110
## Disclaimer
90
111
91
112
Disclaimer: Zerocopy is not an officially supported Google product.
Original file line number Diff line number Diff line change 84
84
//! may be removed at any point in the future.
85
85
//!
86
86
//! [simd-layout]: https://rust-lang.github.io/unsafe-code-guidelines/layout/packed-simd-vectors.html
87
+ //!
88
+ //! # Security Ethos
89
+ //!
90
+ //! Zerocopy is expressly designed for use in security-critical contexts. We
91
+ //! strive to ensure that that zerocopy code is sound under Rust's current
92
+ //! memory model, and *any future memory model*. We ensure this by:
93
+ //! - **...not 'guessing' about Rust's semantics.**
94
+ //! We annotate `unsafe` code with a precise rationale for its soundness that
95
+ //! cites a relevant section of Rust's official documentation. When Rust's
96
+ //! documented semantics are unclear, we work with the Rust Operational
97
+ //! Semantics Team to clarify Rust's documentation.
98
+ //! - **...rigorously testing our implementation.**
99
+ //! We run tests using [Miri], ensuring that zerocopy is sound across a wide
100
+ //! array of supported target platforms of varying endianness and pointer
101
+ //! width, and across both current and experimental memory models of Rust.
102
+ //! - **...formally proving the correctness of our implementation.**
103
+ //! We apply formal verification tools like [Kani][kani] to prove zerocopy's
104
+ //! correctness.
105
+ //!
106
+ //! [Miri]: https://github.com/rust-lang/miri
107
+ //! [Kani]: https://github.com/model-checking/kani
87
108
88
109
// Sometimes we want to use lints which were added after our MSRV.
89
110
// `unknown_lints` is `warn` by default and we deny warnings in CI, so without
You can’t perform that action at this time.
0 commit comments