hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/include/uapi/linux/prctl.h
....@@ -181,7 +181,7 @@
181181 #define PR_GET_THP_DISABLE 42
182182
183183 /*
184
- * Tell the kernel to start/stop helping userspace manage bounds tables.
184
+ * No longer implemented, but left here to ensure the numbers stay reserved:
185185 */
186186 #define PR_MPX_ENABLE_MANAGEMENT 43
187187 #define PR_MPX_DISABLE_MANAGEMENT 44
....@@ -219,13 +219,40 @@
219219 # define PR_SPEC_ENABLE (1UL << 1)
220220 # define PR_SPEC_DISABLE (1UL << 2)
221221 # define PR_SPEC_FORCE_DISABLE (1UL << 3)
222
+# define PR_SPEC_DISABLE_NOEXEC (1UL << 4)
222223
223
-#define PR_SET_VMA 0x53564d41
224
-# define PR_SET_VMA_ANON_NAME 0
224
+/* Reset arm64 pointer authentication keys */
225
+#define PR_PAC_RESET_KEYS 54
226
+# define PR_PAC_APIAKEY (1UL << 0)
227
+# define PR_PAC_APIBKEY (1UL << 1)
228
+# define PR_PAC_APDAKEY (1UL << 2)
229
+# define PR_PAC_APDBKEY (1UL << 3)
230
+# define PR_PAC_APGAKEY (1UL << 4)
225231
226232 /* Tagged user address controls for arm64 */
227233 #define PR_SET_TAGGED_ADDR_CTRL 55
228234 #define PR_GET_TAGGED_ADDR_CTRL 56
229235 # define PR_TAGGED_ADDR_ENABLE (1UL << 0)
236
+/* MTE tag check fault modes */
237
+# define PR_MTE_TCF_NONE 0
238
+# define PR_MTE_TCF_SYNC (1UL << 1)
239
+# define PR_MTE_TCF_ASYNC (1UL << 2)
240
+# define PR_MTE_TCF_MASK (PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC)
241
+/* MTE tag inclusion mask */
242
+# define PR_MTE_TAG_SHIFT 3
243
+# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
244
+/* Unused; kept only for source compatibility */
245
+# define PR_MTE_TCF_SHIFT 1
246
+
247
+/* Control reclaim behavior when allocating memory */
248
+#define PR_SET_IO_FLUSHER 57
249
+#define PR_GET_IO_FLUSHER 58
250
+
251
+#define PR_SET_VMA 0x53564d41
252
+# define PR_SET_VMA_ANON_NAME 0
253
+
254
+/* Set/get enabled arm64 pointer authentication keys */
255
+#define PR_PAC_SET_ENABLED_KEYS 60
256
+#define PR_PAC_GET_ENABLED_KEYS 61
230257
231258 #endif /* _LINUX_PRCTL_H */