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 @@ -3049,8 +3049,13 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
30493049 return CallInst::Create (NewFn, CallArgs);
30503050 }
30513051 case Intrinsic::ptrauth_sign: {
3052- // auth + sign can be replaced with resign, which prevents unsafe
3053- // spills and reloads of intermediate authenticated value.
3052+ // Replace auth+sign with a single resign intrinsic.
3053+ // When auth and sign operations are performed separately, later compiler
3054+ // passes may spill intermediate result to memory as a raw, unprotected
3055+ // pointer, which makes it possible for an attacker to replace it under
3056+ // PAuth threat model. On the other hand, resign intrinsic is not expanded
3057+ // until AsmPrinter, when it is emitted as a contiguous, non-attackable
3058+ // sequence of instructions.
30543059 Value *Ptr = II->getArgOperand (0 );
30553060 Value *SignKey = II->getArgOperand (1 );
30563061 Value *SignDisc = II->getArgOperand (2 );
You can’t perform that action at this time.
0 commit comments