[PATCH] D51429: [AArch64] Return Address Signing B Key Support

Oliver Stannard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 9 05:10:03 PDT 2018


olista01 added inline comments.


================
Comment at: lib/Frontend/CompilerInvocation.cpp:1133
+  if (Arg *A = Args.getLastArg(OPT_msign_return_address_EQ)) {
+    const auto SignScopeKey = StringRef(A->getValue()).split('+');
+    StringRef SignScope = SignScopeKey.first;
----------------
The driver code is emitting a separate -msign-return-address-key= option, but this is expecting the key to still be part of -msign-return-address=, so we can never end up selecting the B key. Out of the two approaches, I prefer having multiple simpler options in CC1, so that we don't have to repeat all of the parsing that happens in the driver.

Also, you're emitting the -mbranch-target-enforce option in the driver, but not handling it here. We should either reject it in the driver for now, or add the CC1 part of that in this patch.


https://reviews.llvm.org/D51429





More information about the cfe-commits mailing list