LLVM: llvm::AArch64PAuth Namespace Reference (original) (raw)
| Enumerations | |
|---|---|
| enum class | AuthCheckMethod { None, DummyLoad, HighBitsNoTBI, XPACHint, XPAC } |
| Variants of check performed on an authenticated pointer. More... |
| Functions | |
|---|---|
| unsigned | getCheckerSizeInBytes (AuthCheckMethod Method) |
| Returns the number of bytes added by checkAuthenticatedRegister. |
◆ AuthCheckMethod
Variants of check performed on an authenticated pointer.
In cases such as authenticating the LR value when performing a tail call or when re-signing a signed pointer with a different signing schema, a failed authentication may not generate an exception on its own and may create an authentication or signing oracle if not checked explicitly.
A number of check methods modify control flow in a similar way by rewriting the code
inst_range instructions(Function *F)
as follows:
on_fail:
brk
on_success:
| Enumerator | |
|---|---|
| None | Do not check the value at all. |
| DummyLoad | Perform a load to a temporary register. |
| HighBitsNoTBI | Check by comparing bits 62 and 61 of the authenticated address. This method modifies control flow and inserts the following checker: eor Xtmp, Xn, Xn, lsl #1 tbz Xtmp, #62, on_success |
| XPACHint | Check by comparing the authenticated value with an XPAC-ed one without using PAuth instructions not encoded as HINT. Can only be applied to LR. This method modifies control flow and inserts the following checker: mov Xtmp, LR xpaclri ; encoded as "hint #7" ; Note: at this point, the LR register contains the address as if ; the authentication succeeded and the temporary register contains the ; *real* result of authentication. cmp Xtmp, LR b.eq on_success ifif(PassOpts->AAPipeline)Definition PassBuilderBindings.cpp:64 containsstatic bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)Definition Value.cpp:480 llvm::atAssignment Tracking (at).Definition DebugInfo.h:173 llvm::succeededbool succeeded(LogicalResult Result)Utility function that returns true if the provided LogicalResult corresponds to a success value.Definition LogicalResult.h:67 llvm::HighlightColor::Note@ NoteDefinition WithColor.h:36 |
| XPAC | Similar to XPACHint but using Armv8.3-only XPAC instruction, thus not restricted to LR: mov Xtmp, Xn xpac(i|d) Xn cmp Xtmp, Xn b.eq on_success |
Definition at line 44 of file AArch64PointerAuth.h.
◆ getCheckerSizeInBytes()
| unsigned llvm::AArch64PAuth::getCheckerSizeInBytes | ( | AuthCheckMethod | Method | ) |
|---|