arm64: add prctl control for resetting ptrauth keys
Add an arm64-specific prctl to allow a thread to reinitialize its pointer authentication keys to random values. This can be useful when exec() is not used for starting new processes, to ensure that different processes still have different keys. Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:

committed by
Will Deacon

parent
ccc4381082
commit
ba83088565
@@ -219,4 +219,12 @@ struct prctl_mm_map {
|
||||
# define PR_SPEC_DISABLE (1UL << 2)
|
||||
# define PR_SPEC_FORCE_DISABLE (1UL << 3)
|
||||
|
||||
/* Reset arm64 pointer authentication keys */
|
||||
#define PR_PAC_RESET_KEYS 54
|
||||
# define PR_PAC_APIAKEY (1UL << 0)
|
||||
# define PR_PAC_APIBKEY (1UL << 1)
|
||||
# define PR_PAC_APDAKEY (1UL << 2)
|
||||
# define PR_PAC_APDBKEY (1UL << 3)
|
||||
# define PR_PAC_APGAKEY (1UL << 4)
|
||||
|
||||
#endif /* _LINUX_PRCTL_H */
|
||||
|
Reference in New Issue
Block a user