-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Please add support for Intel CET #73820
Copy link
Copy link
Closed as not planned
Labels
A-codegenArea: Code generationArea: Code generationA-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
https://www.linuxplumbersconf.org/event/2/contributions/147/attachments/72/83/CET-LPC-2018.pdf
When compiling C binaries with
-fcf-protectionthe binaries are generated with Indirect Branch Tracking (IBT) Shadow Stack (SHSTK) features, and are thus CET enabled.I cannot find a way for rustc compiler to generate binaries with the gnu properties declared on the ELF binary, but also have the right
endbranchinstructions emitted.Trying to set CFLAGS/LDFLAGS/RUSTFLAGS did not make rustc compiler generate CET enabled binaries, thus I am assuming that rustc does not have support for CET.
I looked through the available codegen options and also did not find a way to generate CET enabled binaries.
Please add support for rustc to generate CET enabled binaries, when toolchain has support for it. Or please document how to make rustc do so, because gcc / LLVM and linkers have support for it.