[PATCH] D93428: [AArch64] Add bti note property when compiling asm files with -mbranch-protection=bti

Daniel Kiss via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 17 10:11:32 PST 2020


danielkiss added a comment.

> Is there a reason why assembly files have a different flag (i.e. -mmark-bti-property) to create the .note.gnu.property with the BTI entry?

In assembly the compiler can't guarantee the landing pads are in place, therefore it doesn't add it automatically.
The original concept was this the developers should add the landing pads wherever needed and by adding the note they mark the file is compatible with BTI.
After adding BTI to many assembly code it was clear the note is error prone and cumbersome to handle and I thing it provides zero protection against regression issues , so the `-mmark-bti-property` is introduced. 
The developers still should add the landing pads but optionally they could mark the files in the build system instead of the assembly files. 
The worry is if the assembly file would be marked automatically the produces binary probably won't run correctly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93428/new/

https://reviews.llvm.org/D93428



More information about the cfe-commits mailing list