mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/5] futex: Random fixes after the private-hash series.
@ 2025-05-17 15:14 Sebastian Andrzej Siewior
  2025-05-17 15:14 ` [PATCH v2 1/5] selftests/futex: Use TAP output in futex_priv_hash Sebastian Andrzej Siewior
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-05-17 15:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: André Almeida, Darren Hart, Davidlohr Bueso, Ingo Molnar,
	Juri Lelli, Peter Zijlstra, Thomas Gleixner, Valentin Schneider,
	Waiman Long, Sebastian Andrzej Siewior

A few things were raised after the private-hash series has been merged.
Here are the fixes for it. Nothing serious but should be merged before
it hits ht merge window.

v1…v2: https://lore.kernel.org/all/20250516160339.1022507-1-bigeasy@linutronix.de/
   - Correct the introduce compile errors in while trying to use the
     FH_FLAG_IMMUTABLE in the selftest.
   - Use FH_FLAG_IMMUTABLE also in perf bench futex.

Sebastian Andrzej Siewior (5):
  selftests/futex: Use TAP output in futex_priv_hash
  selftests/futex: Use TAP output in futex_numa_mpol
  futex: Use RCU_INIT_POINTER() in futex_mm_init().
  tools headers: Synchronize prctl.h ABI header
  futex: Correct the kernedoc return value for futex_wait_setup().

 include/linux/futex.h                         |   9 +-
 kernel/futex/waitwake.c                       |   3 +-
 tools/include/uapi/linux/prctl.h              |   1 +
 tools/perf/bench/futex.c                      |   4 +-
 .../futex/functional/futex_numa_mpol.c        |  65 ++++---
 .../futex/functional/futex_priv_hash.c        | 169 ++++++++----------
 6 files changed, 112 insertions(+), 139 deletions(-)

-- 
2.49.0

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH v12 18/21] tools headers: Synchronize prctl.h ABI header
@ 2025-04-16 16:29 Sebastian Andrzej Siewior
  2025-05-08 10:33 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-04-16 16:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: André Almeida, Darren Hart, Davidlohr Bueso, Ingo Molnar,
	Juri Lelli, Peter Zijlstra, Thomas Gleixner, Valentin Schneider,
	Waiman Long, Sebastian Andrzej Siewior, Liang, Kan,
	Adrian Hunter, Alexander Shishkin, Arnaldo Carvalho de Melo,
	Ian Rogers, Jiri Olsa, Mark Rutland, Namhyung Kim,
	linux-perf-users

Synchronize prctl.h with current uapi version after adding
PR_FUTEX_HASH.

Cc: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 tools/include/uapi/linux/prctl.h | 44 +++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/tools/include/uapi/linux/prctl.h b/tools/include/uapi/linux/prctl.h
index 35791791a879b..21f30b3ded74b 100644
--- a/tools/include/uapi/linux/prctl.h
+++ b/tools/include/uapi/linux/prctl.h
@@ -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 */
-- 
2.49.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-05-21 12:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-17 15:14 [PATCH v2 0/5] futex: Random fixes after the private-hash series Sebastian Andrzej Siewior
2025-05-17 15:14 ` [PATCH v2 1/5] selftests/futex: Use TAP output in futex_priv_hash Sebastian Andrzej Siewior
2025-05-21 12:06   ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-05-17 15:14 ` [PATCH v2 2/5] selftests/futex: Use TAP output in futex_numa_mpol Sebastian Andrzej Siewior
2025-05-21 12:06   ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-05-17 15:14 ` [PATCH v2 3/5] futex: Use RCU_INIT_POINTER() in futex_mm_init() Sebastian Andrzej Siewior
2025-05-21 12:06   ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-05-17 15:14 ` [PATCH v2 4/5] tools headers: Synchronize prctl.h ABI header Sebastian Andrzej Siewior
2025-05-21 12:06   ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-05-17 15:14 ` [PATCH v2 5/5] futex: Correct the kernedoc return value for futex_wait_setup() Sebastian Andrzej Siewior
2025-05-21 12:06   ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
  -- strict thread matches above, loose matches on Subject: below --
2025-04-16 16:29 [PATCH v12 18/21] tools headers: Synchronize prctl.h ABI header Sebastian Andrzej Siewior
2025-05-08 10:33 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®