tools headers: Synchronize prctl.h ABI header
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 16 Apr 2025 16:29:18 +0000 (18:29 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Sat, 3 May 2025 10:02:09 +0000 (12:02 +0200)
Synchronize prctl.h with current uapi version after adding
PR_FUTEX_HASH.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250416162921.513656-19-bigeasy@linutronix.de
tools/include/uapi/linux/prctl.h

index 35791791a879b288f02fecb6803e5eaeec609fc4..21f30b3ded74bcb029bf05dadaa33c4069c99a48 100644 (file)
@@ -230,7 +230,7 @@ struct prctl_mm_map {
 # define PR_PAC_APDBKEY                        (1UL << 3)
 # define PR_PAC_APGAKEY                        (1UL << 4)
 
-/* Tagged user address controls for arm64 */
+/* Tagged user address controls for arm64 and RISC-V */
 #define PR_SET_TAGGED_ADDR_CTRL                55
 #define PR_GET_TAGGED_ADDR_CTRL                56
 # define PR_TAGGED_ADDR_ENABLE         (1UL << 0)
@@ -244,6 +244,9 @@ struct prctl_mm_map {
 # define PR_MTE_TAG_MASK               (0xffffUL << PR_MTE_TAG_SHIFT)
 /* Unused; kept only for source compatibility */
 # define PR_MTE_TCF_SHIFT              1
+/* RISC-V pointer masking tag length */
+# define PR_PMLEN_SHIFT                        24
+# define PR_PMLEN_MASK                 (0x7fUL << PR_PMLEN_SHIFT)
 
 /* Control reclaim behavior when allocating memory */
 #define PR_SET_IO_FLUSHER              57
@@ -328,4 +331,43 @@ struct prctl_mm_map {
 # define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC        0x10 /* Clear the aspect on exec */
 # define PR_PPC_DEXCR_CTRL_MASK                0x1f
 
+/*
+ * Get the current shadow stack configuration for the current thread,
+ * this will be the value configured via PR_SET_SHADOW_STACK_STATUS.
+ */
+#define PR_GET_SHADOW_STACK_STATUS      74
+
+/*
+ * Set the current shadow stack configuration.  Enabling the shadow
+ * stack will cause a shadow stack to be allocated for the thread.
+ */
+#define PR_SET_SHADOW_STACK_STATUS      75
+# define PR_SHADOW_STACK_ENABLE         (1UL << 0)
+# define PR_SHADOW_STACK_WRITE         (1UL << 1)
+# define PR_SHADOW_STACK_PUSH          (1UL << 2)
+
+/*
+ * Prevent further changes to the specified shadow stack
+ * configuration.  All bits may be locked via this call, including
+ * undefined bits.
+ */
+#define PR_LOCK_SHADOW_STACK_STATUS      76
+
+/*
+ * Controls the mode of timer_create() for CRIU restore operations.
+ * Enabling this allows CRIU to restore timers with explicit IDs.
+ *
+ * Don't use for normal operations as the result might be undefined.
+ */
+#define PR_TIMER_CREATE_RESTORE_IDS            77
+# define PR_TIMER_CREATE_RESTORE_IDS_OFF       0
+# define PR_TIMER_CREATE_RESTORE_IDS_ON                1
+# define PR_TIMER_CREATE_RESTORE_IDS_GET       2
+
+/* FUTEX hash management */
+#define PR_FUTEX_HASH                  78
+# define PR_FUTEX_HASH_SET_SLOTS       1
+# define PR_FUTEX_HASH_GET_SLOTS       2
+# define PR_FUTEX_HASH_GET_IMMUTABLE   3
+
 #endif /* _LINUX_PRCTL_H */