Skip to content

Commit c0075d7

Browse files
committed
Update the description of getMaterializedAddressRegForPtrAuth
1 parent 2bf9f89 commit c0075d7

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,12 +587,19 @@ class MCPlusBuilder {
587587
return getNoRegister();
588588
}
589589

590-
/// Returns the register containing an address which is safely materialized
591-
/// under Pointer Authentication threat model, or NoRegister otherwise.
590+
/// Returns the register containing an address safely materialized by `Inst`
591+
/// under the Pointer Authentication threat model.
592592
///
593-
/// The produced address should not be attacker-controlled, assuming an
594-
/// attacker is able to modify any writable memory, but not executable code
595-
/// (as it should be W^X).
593+
/// Returns the register `Inst` writes to if:
594+
/// 1. the register is a materialized address, and
595+
/// 2. the register has been materialized safely, i.e. cannot be attacker-
596+
/// controlled, under the Pointer Authentication threat model.
597+
///
598+
/// If the instruction does not write to any register satisfying the above
599+
/// two conditions, NoRegister is returned.
600+
///
601+
/// The Pointer Authentication threat model assumes an attacker is able to
602+
/// modify any writable memory, but not executable code (due to W^X).
596603
virtual MCPhysReg
597604
getMaterializedAddressRegForPtrAuth(const MCInst &Inst) const {
598605
llvm_unreachable("not implemented");

0 commit comments

Comments
 (0)