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
Assembly: enable CET #96
Conversation
I have no idea what this means. Can I leave it to you to hit the merge button whenever you think it's ready? :) |
Looks good to me! The test C binary is marked as CET enabled. Please merge. |
I find this presentation the best explanation about the CET technology https://www.linuxplumbersconf.org/event/2/contributions/147/attachments/72/83/CET-LPC-2018.pdf |
Maybe @hjl-tools could review this too. This adds CET support to BLAKE3 asm. |
Since the assembly codes are in .S, you should do
and use _CET_ENDBR everywhere ENDBR is needed. Since -fcf-protection needs binutils with CET support, |
The reason I did not just include the |
LLVM doesn't working CET support before LLVM 11 which also includes <cet.h>: https://bugs.llvm.org/show_bug.cgi?id=45484 Most of CET fixes have been backported to LLVM 10.x, except for <cet.h>. You can do
|
Goes in as suggested. |
Thank you @hjl-tools for your input! Much appreciated! |
Assembly: enable CET
Addresses #95.
With our current dispatcher, both on C and Rust, having
endbr64
at the top of the functions is rather pointless since these will never be at the end of an indirect call. But since this is a glorifiednop
, might as well.