This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][compiler-rt] Add Pointer Authentication support for VFORK.
ClosedPublic

Authored by danielkiss on Mar 4 2021, 11:13 PM.

Details

Summary

The LR is stored to off-stack spill area where it is vulnerable.
"paciasp" add an auth code to the LR while the "autiasp" verifies that so
LR can't be modiifed on the spill area.

Test: build with -DCMAKE_C_FLAGS="-mbranch-protection=standard",
run on Armv8.3 capable hardware with PAuth.

Diff Detail

Event Timeline

danielkiss created this revision.Mar 4 2021, 11:13 PM
danielkiss requested review of this revision.Mar 4 2021, 11:13 PM
eugenis accepted this revision.Mar 5 2021, 10:24 AM

LGTM

This revision is now accepted and ready to land.Mar 5 2021, 10:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2021, 7:40 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

This patch was causing failures on the AArch64 buildbots, because the compilers they use (clang 10.0 and gcc 9.3.0) don't accept these instructions when targeting armv8.0-a. I've committed https://reviews.llvm.org/rG0070c9ee2d2ce8 to use the hint mnemonic instead for these, which is supported by all aarch64 assemblers.