-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LLVM KCFI support to the Rust compiler #105109
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
These commits modify compiler targets. Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'll take a look at this fasthash build failure soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few trivial comments, though it looks fine to my untrained eyes.
This comment has been minimized.
This comment has been minimized.
You will need to add the new dependencies to the list at rust/src/tools/tidy/src/deps.rs Line 82 in 11663b1
|
That is what I was looking for! Thank you! |
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).
This commit adds LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler. It initially provides forward-edge control flow protection for operating systems kernels for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. (See llvm/llvm-project@cff5bef.) Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue rust-lang#89653). LLVM KCFI can be enabled with -Zsanitizer=kcfi. Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
This commit adds initial documentation for LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler (see rust-lang#105109 and rust-lang#89653). Co-authored-by: Miguel Ojeda <ojeda@users.noreply.github.com>
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#98391 (Reimplement std's thread parker on top of events on SGX) - rust-lang#104019 (Compute generator sizes with `-Zprint_type_sizes`) - rust-lang#104512 (Set `download-ci-llvm = "if-available"` by default when `channel = dev`) - rust-lang#104901 (Implement masking in FileType comparison on Unix) - rust-lang#105082 (Fix Async Generator ABI) - rust-lang#105109 (Add LLVM KCFI support to the Rust compiler) - rust-lang#105505 (Don't warn about unused parens when they are used by yeet expr) - rust-lang#105514 (Introduce `Span::is_visible`) - rust-lang#105516 (Update cargo) - rust-lang#105522 (Remove wrong note for short circuiting operators) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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).
|
||
pub fn target() -> Target { | ||
let opts = TargetOptions { | ||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), | ||
linker: Some("rust-lld".into()), | ||
features: "+strict-align,+neon,+fp-armv8".into(), | ||
supported_sanitizers: SanitizerSet::KCFI, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the aarch64-unknown-none-softfloat
target also support KCFI?
Add LLVM KCFI support to the Rust compiler This PR adds LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler. It initially provides forward-edge control flow protection for operating systems kernels for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. (See llvm/llvm-project@cff5bef.) Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue rust-lang#89653). LLVM KCFI can be enabled with -Zsanitizer=kcfi. Thank you again, `@bjorn3,` `@eddyb,` `@nagisa,` and `@ojeda,` for all the help!
This commit adds initial documentation for LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler (see rust-lang#105109 and rust-lang#89653).
This commit adds initial documentation for LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler (see rust-lang#105109 and rust-lang#89653).
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).
This PR adds LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler. It initially provides forward-edge control flow protection for operating systems kernels for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. (See llvm/llvm-project@cff5bef.)
Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue #89653).
LLVM KCFI can be enabled with -Zsanitizer=kcfi.
Thank you again, @bjorn3, @eddyb, @nagisa, and @ojeda, for all the help!