File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2993,8 +2993,13 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
29932993 return CallInst::Create (NewFn, CallArgs);
29942994 }
29952995 case Intrinsic::ptrauth_sign: {
2996- // auth + sign can be replaced with resign, which prevents unsafe
2997- // spills and reloads of intermediate authenticated value.
2996+ // Replace auth+sign with a single resign intrinsic.
2997+ // When auth and sign operations are performed separately, later compiler
2998+ // passes may spill intermediate result to memory as a raw, unprotected
2999+ // pointer, which makes it possible for an attacker to replace it under
3000+ // PAuth threat model. On the other hand, resign intrinsic is not expanded
3001+ // until AsmPrinter, when it is emitted as a contiguous, non-attackable
3002+ // sequence of instructions.
29983003 Value *Ptr = II->getArgOperand (0 );
29993004 Value *SignKey = II->getArgOperand (1 );
30003005 Value *SignDisc = II->getArgOperand (2 );
You can’t perform that action at this time.
0 commit comments