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.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -219,4 +219,12 @@ struct prctl_mm_map { · 218 unmodified lines | |||
| 219 | # define PR_SPEC_DISABLE (1UL << 2) | 219 | # define PR_SPEC_DISABLE (1UL << 2) |
| 220 | # define PR_SPEC_FORCE_DISABLE (1UL << 3) | 220 | # define PR_SPEC_FORCE_DISABLE (1UL << 3) |
| 221 | 221 | ||
| 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 | |||
| 222 | #endif /* _LINUX_PRCTL_H */ | 230 | #endif /* _LINUX_PRCTL_H */ |