Page MenuHomePhabricator

[compiler-rt][aarch64] Add PAC-RET/BTI support to TSan.
Needs ReviewPublic

Authored by danielkiss on Apr 8 2021, 2:42 PM.



Support for -mbranch-protection on aarch64.

Diff Detail

Event Timeline

danielkiss created this revision.Apr 8 2021, 2:42 PM
danielkiss requested review of this revision.Apr 8 2021, 2:42 PM

I am not much knowledgeable about PAC and would otherwise leave this to somebody else.


Since this is a compile-time check, are we supposed to provide 2 builds of tsan runtime after this change? If yes, should this also include some cmake changes?

yln added a reviewer: qikon.Apr 13 2021, 9:28 AM
qikon resigned from this revision.Apr 13 2021, 10:01 AM
qikon edited reviewers, added: ab; removed: qikon.
ab added inline comments.Tue, May 11, 10:47 AM

Yeah, I would go further: the instructions are hints and no-ops, can't they always be used? Though it would need a mechanism to disable it by default: I see PAC_FLAG is based on the new PAC/BTI feature macros; we'd want to disable this for darwin.

I'm not familiar with the contract around the GNU property and the CFI info and all that, so maybe there's some complication there.