* [merged mm-nonmm-stable] selftests-membarrier-skip-unpermitted-membarrier-command-test-if-preregistered-by-libc.patch removed from -mm tree
@ 2026-10-07 2:04 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-07 2:04 UTC (permalink / raw)
To: mm-commits, vschneid, vincent.guittot, shuah, rostedt,
richard.weiyang, peterz, paulmck, mjeanson, mingo, mgorman,
mathieu.desnoyers, kprateek.nayak, juri.lelli, dietmar.eggemann,
bsegall, christian.gellermann, akpm
The quilt patch titled
Subject: selftests/membarrier: skip unpermitted membarrier command test if preregistered by libc
has been removed from the -mm tree. Its filename was
selftests-membarrier-skip-unpermitted-membarrier-command-test-if-preregistered-by-libc.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Chris Gellermann <christian.gellermann@codasip.com>
Subject: selftests/membarrier: skip unpermitted membarrier command test if preregistered by libc
Date: Mon, 3 Aug 2026 14:49:00 +0200
On thread creation, Musl registers the private expedited memory barrier,
see pthread_create [1]. Thus, invoking the barrier command will no longer
be rejected by the kernel with EPERM. The test checking this will fail.
Check if the memory barrier command has been registered and skip the test
in this case.
Link: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_create.c#n260 [1]
Link: https://lore.kernel.org/20260803124900.3328789-3-christian.gellermann@codasip.com
Signed-off-by: Chris Gellermann <christian.gellermann@codasip.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Michael Jeanson <mjeanson@efficios.com>
Cc: Ben Segall <bsegall@google.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: "Paul E . McKenney" <paulmck@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Wei Yang <richard.weiyang@gmail.com>
---
tools/testing/selftests/membarrier/membarrier_test_impl.h | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/tools/testing/selftests/membarrier/membarrier_test_impl.h~selftests-membarrier-skip-unpermitted-membarrier-command-test-if-preregistered-by-libc
+++ a/tools/testing/selftests/membarrier/membarrier_test_impl.h
@@ -113,6 +113,16 @@ static int test_membarrier_private_exped
int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED, flags = 0;
const char *test_name = "sys membarrier MEMBARRIER_CMD_PRIVATE_EXPEDITED not registered failure";
+ /*
+ * Some C libraries, like Musl, register the private expedited barrier
+ * command when creating a thread. Expecting an EPERM on an unregistered
+ * command will therefore no longer work. Skip the test in this case.
+ */
+ if (MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED & membarrier_get_registrations()) {
+ ksft_test_result_skip("%s test: Command already registered\n", test_name);
+ return 0;
+ }
+
if (sys_membarrier(cmd, flags) != -1) {
ksft_exit_fail_msg(
"%s test: flags = %d. Should fail, but passed\n",
_
Patches currently in -mm which might be from christian.gellermann@codasip.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-07 2:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 2:04 [merged mm-nonmm-stable] selftests-membarrier-skip-unpermitted-membarrier-command-test-if-preregistered-by-libc.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.