diff options
author | Kristina Martsenko <kristina.martsenko@arm.com> | 2018-12-07 18:39:28 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-12-13 16:42:46 +0000 |
commit | ba830885656414101b2f8ca88786524d4bb5e8c1 (patch) | |
tree | 9112fbf1aee1ffcb239e5c24b767208ae0a8eec2 /include/uapi/linux/prctl.h | |
parent | ccc43810827f9feb5e588e4b7098dc55b1d972f8 (diff) | |
download | lwn-ba830885656414101b2f8ca88786524d4bb5e8c1.tar.gz lwn-ba830885656414101b2f8ca88786524d4bb5e8c1.zip |
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>
Diffstat (limited to 'include/uapi/linux/prctl.h')
-rw-r--r-- | include/uapi/linux/prctl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index c0d7ea0bf5b6..0f535a501391 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h @@ -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 */ |