History

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.

Kristina Martsenko committed 7 years ago

Commit ba830881 parent ccc43816 files · +71 −0Browse files

Showing the changes to include/uapi/linux (1 of 6 files). Show all

Unified · Split

include/uapi/linux/prctl.h+8−0
@@ -219,4 +219,12 @@ struct prctl_mm_map { · 218 unmodified lines
219219 # define PR_SPEC_DISABLE (1UL << 2)
220220 # define PR_SPEC_FORCE_DISABLE (1UL << 3)
221221
222+/* Reset arm64 pointer authentication keys */
223+#define PR_PAC_RESET_KEYS 54
224+# define PR_PAC_APIAKEY (1UL << 0)
225+# define PR_PAC_APIBKEY (1UL << 1)
226+# define PR_PAC_APDAKEY (1UL << 2)
227+# define PR_PAC_APDBKEY (1UL << 3)
228+# define PR_PAC_APGAKEY (1UL << 4)
229+
222230 #endif /* _LINUX_PRCTL_H */