It is not desirable to relax the ABI to allow tagged user addresses into the kernel indiscriminately. This patch introduces a prctl() interface for enabling or disabling the tagged ABI with a global sysctl control for preventing applications from enabling the relaxed ABI (meant for testing user-space prctl() return error checking without reconfiguring the kernel). The ABI properties are inherited by threads of the same application and fork()'ed children but cleared on execve(). A Kconfig option allows the overall disabling of the relaxed ABI. The PR_SET_TAGGED_ADDR_CTRL will be expanded in the future to handle MTE-specific settings like imprecise vs precise exceptions.
Showing the changes to include/uapi/linux (1 of 7 files). Show all
Unified · Split
| @@ -229,4 +229,9 @@ struct prctl_mm_map { · 228 unmodified lines | |||
| 229 | # define PR_PAC_APDBKEY (1UL << 3) | 229 | # define PR_PAC_APDBKEY (1UL << 3) |
| 230 | # define PR_PAC_APGAKEY (1UL << 4) | 230 | # define PR_PAC_APGAKEY (1UL << 4) |
| 231 | 231 | ||
| 232 | /* Tagged user address controls for arm64 */ | ||
| 233 | #define PR_SET_TAGGED_ADDR_CTRL 55 | ||
| 234 | #define PR_GET_TAGGED_ADDR_CTRL 56 | ||
| 235 | # define PR_TAGGED_ADDR_ENABLE (1UL << 0) | ||
| 236 | |||
| 232 | #endif /* _LINUX_PRCTL_H */ | 237 | #endif /* _LINUX_PRCTL_H */ |