diff options
| author | Vladimir Murzin <[email protected]> | 2022-02-24 12:49:52 +0000 |
|---|---|---|
| committer | Will Deacon <[email protected]> | 2022-02-25 13:38:52 +0000 |
| commit | def8c222f054d18aac1fd065a50b9db5feaefa9d (patch) | |
| tree | d09cadc08823c4b0f5cb313e503836a03c1dd143 /arch/arm64/include/asm/asm_pointer_auth.h | |
| parent | arm64: cpufeature: Mark existing PAuth architected algorithm as QARMA5 (diff) | |
| download | kernel-def8c222f054d18aac1fd065a50b9db5feaefa9d.tar.gz kernel-def8c222f054d18aac1fd065a50b9db5feaefa9d.zip | |
arm64: Add support of PAuth QARMA3 architected algorithm
QARMA3 is relaxed version of the QARMA5 algorithm which expected to
reduce the latency of calculation while still delivering a suitable
level of security.
Support for QARMA3 can be discovered via ID_AA64ISAR2_EL1
APA3, bits [15:12] Indicates whether the QARMA3 algorithm is
implemented in the PE for address
authentication in AArch64 state.
GPA3, bits [11:8] Indicates whether the QARMA3 algorithm is
implemented in the PE for generic code
authentication in AArch64 state.
Signed-off-by: Vladimir Murzin <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'arch/arm64/include/asm/asm_pointer_auth.h')
| -rw-r--r-- | arch/arm64/include/asm/asm_pointer_auth.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/asm_pointer_auth.h b/arch/arm64/include/asm/asm_pointer_auth.h index f1bba5fc61c4..ead62f7dd269 100644 --- a/arch/arm64/include/asm/asm_pointer_auth.h +++ b/arch/arm64/include/asm/asm_pointer_auth.h @@ -60,6 +60,9 @@ alternative_else_nop_endif .macro __ptrauth_keys_init_cpu tsk, tmp1, tmp2, tmp3 mrs \tmp1, id_aa64isar1_el1 ubfx \tmp1, \tmp1, #ID_AA64ISAR1_APA_SHIFT, #8 + mrs_s \tmp2, SYS_ID_AA64ISAR2_EL1 + ubfx \tmp2, \tmp2, #ID_AA64ISAR2_APA3_SHIFT, #4 + orr \tmp1, \tmp1, \tmp2 cbz \tmp1, .Lno_addr_auth\@ mov_q \tmp1, (SCTLR_ELx_ENIA | SCTLR_ELx_ENIB | \ SCTLR_ELx_ENDA | SCTLR_ELx_ENDB) |
