about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorRamon de C Valle <rcvalle@users.noreply.github.com>2022-12-14 03:20:53 -0800
committerGitHub <noreply@github.com>2022-12-14 12:20:53 +0100
commita8d2d44b669ec056419cfcdb27ae93c2349c8ebd (patch)
treebba86f3645eb5742f40f6aacbdf0c20b2ed4eb2c /src/doc/rustc-dev-guide
parente39e0fdb8f75f45b457f024736170f785ee20b98 (diff)
downloadrust-a8d2d44b669ec056419cfcdb27ae93c2349c8ebd.tar.gz
rust-a8d2d44b669ec056419cfcdb27ae93c2349c8ebd.zip
Add documentation for LLVM KCFI support (#1529)
This commit adds initial documentation for LLVM Kernel Control Flow
Integrity (KCFI) support to the Rust compiler (see rust-lang/rust#105109
and rust-lang/rust#89653).
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/sanitizers.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/doc/rustc-dev-guide/src/sanitizers.md b/src/doc/rustc-dev-guide/src/sanitizers.md
index a088d62eda0..e3aa44ea906 100644
--- a/src/doc/rustc-dev-guide/src/sanitizers.md
+++ b/src/doc/rustc-dev-guide/src/sanitizers.md
@@ -9,6 +9,9 @@ The rustc compiler contains support for following sanitizers:
   forward-edge control flow protection.
 * [Hardware-assisted AddressSanitizer][clang-hwasan]  a tool similar to
   AddressSanitizer but based on partial hardware assistance.
+* [KernelControlFlowIntegrity][clang-kcfi] LLVM Kernel Control Flow Integrity
+  (KCFI) provides forward-edge control flow protection for operating systems
+  kernels.
 * [LeakSanitizer][clang-lsan] a run-time memory leak detector.
 * [MemorySanitizer][clang-msan] a detector of uninitialized reads.
 * [ThreadSanitizer][clang-tsan] a fast data race detector.
@@ -16,9 +19,9 @@ The rustc compiler contains support for following sanitizers:
 ## How to use the sanitizers?
 
 To enable a sanitizer compile with `-Z sanitizer=...` option, where value is one
-of `address`, `cfi`, `hwaddress`, `leak`, `memory` or `thread`. For more details
-on how to use sanitizers please refer to the sanitizer flag in [the unstable
-book](https://doc.rust-lang.org/unstable-book/).
+of `address`, `cfi`, `hwaddress`, `kcfi`, `leak`, `memory` or `thread`. For more
+details on how to use sanitizers please refer to the sanitizer flag in [the
+unstable book](https://doc.rust-lang.org/unstable-book/).
 
 ## How are sanitizers implemented in rustc?
 
@@ -109,6 +112,7 @@ To enable a sanitizer on a new target which is already supported by LLVM:
 * [AddressSanitizer in Clang][clang-asan]
 * [ControlFlowIntegrity in Clang][clang-cfi]
 * [Hardware-assisted AddressSanitizer][clang-hwasan]
+* [KernelControlFlowIntegrity in Clang][clang-kcfi]
 * [LeakSanitizer in Clang][clang-lsan]
 * [MemorySanitizer in Clang][clang-msan]
 * [ThreadSanitizer in Clang][clang-tsan]
@@ -116,6 +120,7 @@ To enable a sanitizer on a new target which is already supported by LLVM:
 [clang-asan]: https://clang.llvm.org/docs/AddressSanitizer.html
 [clang-cfi]: https://clang.llvm.org/docs/ControlFlowIntegrity.html
 [clang-hwasan]: https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
+[clang-kcfi]: https://clang.llvm.org/docs/ControlFlowIntegrity.html#fsanitize-kcfi
 [clang-lsan]: https://clang.llvm.org/docs/LeakSanitizer.html
 [clang-msan]: https://clang.llvm.org/docs/MemorySanitizer.html
 [clang-tsan]: https://clang.llvm.org/docs/ThreadSanitizer.html