summaryrefslogtreecommitdiff
path: root/include/uapi/linux/prctl.h
diff options
context:
space:
mode:
authorKristina Martsenko <kristina.martsenko@arm.com>2018-12-07 21:39:28 +0300
committerWill Deacon <will.deacon@arm.com>2018-12-13 19:42:46 +0300
commitba830885656414101b2f8ca88786524d4bb5e8c1 (patch)
tree9112fbf1aee1ffcb239e5c24b767208ae0a8eec2 /include/uapi/linux/prctl.h
parentccc43810827f9feb5e588e4b7098dc55b1d972f8 (diff)
downloadlinux-ba830885656414101b2f8ca88786524d4bb5e8c1.tar.xz
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.h8
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 */