Linux userland API discussions
 help / color / mirror / Atom feed
From: Gabriel Ravier <gabravier@gmail.com>
To: libc-coord@lists.openwall.com,
	"André Almeida" <andrealmeid@igalia.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Darren Hart" <dvhart@infradead.org>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Waiman Long" <longman@redhat.com>,
	"Ryan Houdek" <Sonicadvance1@gmail.com>,
	"Florian Weimer" <fweimer@redhat.com>,
	"Thomas Gleixner" <tglx@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-api@vger.kernel.org, kernel-dev@igalia.com
Subject: Re: [libc-coord] [PATCH v9 13/14] selftests/futex: Expand for set_robust_list2()
Date: Sun, 6 Dec 2026 17:03:56 +0100	[thread overview]
Message-ID: <d93c73be-6ff7-4d4e-b26a-d95ad9087412@gmail.com> (raw)
In-Reply-To: <20261204-tonyk-robust_futex-v9-13-743d68d488b5@igalia.com>

On 12/4/26 5:15 PM, André Almeida wrote:
> Reuse the same selftest for the original set_robust_list() syscall for
> the new set_robust_list2() syscall. Use kselftest variants feature to
> run the relevant tests for both interfaces. Create new test cases for
> checking invalid parameters, the ability to correctly set multiple lists
> for the same task, and to use 32-bit lists in a 64-bit task.
> 
> Signed-off-by: André Almeida <andrealmeid@igalia.com>
> ---
>   .../selftests/futex/functional/robust_list.c       | 443 +++++++++++++++++++--
>   1 file changed, 409 insertions(+), 34 deletions(-)
> 
> diff --git a/tools/testing/selftests/futex/functional/robust_list.c b/tools/testing/selftests/futex/functional/robust_list.c
> index 5076a685ba97..8723f8a3606c 100644
> --- a/tools/testing/selftests/futex/functional/robust_list.c
> +++ b/tools/testing/selftests/futex/functional/robust_list.c
> @@ -49,6 +49,23 @@
>   # define BUILD_64
>   #endif
>   
> +#ifndef SYS_set_robust_list2
> +# define SYS_set_robust_list2 473
> +
> +#define FUTEX_ROBUST_LIST2_FLAG_NEW_ENTRY	0x1
> +#define FUTEX_ROBUST_LIST2_FLAG_32BIT_ENTRY	0x2
> +
> +struct robust_list32 {
> +	uint32_t next;
> +};
> +
> +struct robust_list_head32 {
> +	struct robust_list32	list;
> +	int32_t			futex_offset;
> +	uint32_t		list_op_pending;
> +};
> +#endif
> +
>   static pthread_barrier_t barrier, barrier2;
>   
>   static int set_robust_list(struct robust_list_head *head, size_t len)
> @@ -67,6 +84,67 @@ static int sys_futex_robust_unlock(_Atomic(uint32_t) *uaddr, unsigned int op, in
>   	return syscall(SYS_futex, uaddr, op, val, NULL, list_op_pending, val3, 0);
>   }
>   
> +static int set_robust_list2(struct robust_list_head *head, unsigned int index,
> +			    unsigned int flags)
> +{
> +	return syscall(SYS_set_robust_list2, head, index, flags, 0, 0);
> +}
> +
> +static int robust_list2_get_list_limit(void)
> +{
> +	const char *sysctl = "/proc/sys/kernel/futex/robust_list2_list_limit";
> +	FILE *f = fopen(sysctl, "r");
> +	unsigned int limit;
> +
> +	if (!f)
> +		return -1;
> +
> +	if (fscanf(f, "%d", &limit) != 1) {

Should presumably be %u (technically UB right now :p)

> +		fclose(f);
> +		return -1;
> +	}
> +
> +	fclose(f);
> +
> +	return limit;
> +}
> +
> +static bool robust_list2_support(void)
> +{
> +	if (robust_list2_get_list_limit() == -1)
> +		return false;
> +
> +	return true;
> +}
> +
> +FIXTURE(robust_api) {};
> +
> +FIXTURE_VARIANT(robust_api)
> +{
> +	bool robust2;
> +};
> +
> +FIXTURE_SETUP(robust_api)
> +{
> +	if (!variant->robust2)
> +		return;
> +
> +	if (!robust_list2_support())
> +		SKIP(return, "robust_list2 not supported");
> +}
> +
> +FIXTURE_TEARDOWN(robust_api) {}
> +
> +FIXTURE_VARIANT_ADD(robust_api, robust1)
> +{
> +	.robust2 = false,
> +};
> +
> +FIXTURE_VARIANT_ADD(robust_api, robust2)
> +{
> +	.robust2 = true,
> +};
> +
>   /*
>    * Basic lock struct, contains just the futex word and the robust list element
>    * Real implementations have also a *prev to easily walk in the list
> @@ -76,6 +154,12 @@ typedef _Atomic(unsigned int) atomic_futex_t;
>   struct lock_struct {
>   	atomic_futex_t		futex;
>   	struct robust_list	list;
> +	bool			robust2;
> +};
> +
> +struct lock_struct32 {
> +	_Atomic(uint32_t)	futex;
> +	struct robust_list32	list;
>   };
>   
>   struct child_args {
> @@ -118,20 +202,32 @@ static int create_child(struct __test_metadata *_metadata, int (*fn)(void *arg),
>   /*
>    * Helper function to prepare and register a robust list
>    */
> -static int set_list(struct robust_list_head *head)
> +static int set_list(struct robust_list_head *head, bool robust2, int *index)
>   {
>   	int ret;
>   
> -	ret = set_robust_list(head, sizeof(*head));
> -	if (ret)
> -		return ret;
> -
>   	head->futex_offset = (size_t) offsetof(struct lock_struct, futex) -
>   			     (size_t) offsetof(struct lock_struct, list);
>   	head->list.next = &head->list;
>   	head->list_op_pending = NULL;
>   
> -	return 0;
> +	if (!robust2)
> +		return set_robust_list(head, sizeof(*head));
> +
> +	ret = set_robust_list2(head, 0, FUTEX_ROBUST_LIST2_FLAG_NEW_ENTRY);
> +
> +	if (ret >= 0 && index)
> +		*index = ret;
> +
> +	return ret;
> +}
> +
> +/*
> + * Change a given list index to a different head
> + */
> +static int modify_list(struct robust_list_head *head, int index)
> +{
> +	return set_robust_list2(head, index, 0);
>   }
>   
>   /*
> @@ -203,12 +299,12 @@ static int child_fn_lock(void *arg)
>   	struct __test_metadata *_metadata = cargs->_metadata;
>   	struct lock_struct *lock = cargs->arg;
>   	struct robust_list_head head;
> -	int ret;
> +	int ret, index;
>   
>   	free(cargs);
>   
> -	ret = set_list(&head);
> -	ASSERT_EQ(ret, 0)
> +	ret = set_list(&head, lock->robust2, &index);
> +	ASSERT_NE(ret, -1)
>   		TH_LOG("set_robust_list error");
>   
>   	ret = mutex_lock(lock, &head, false);
> @@ -233,15 +329,17 @@ static int child_fn_lock(void *arg)
>    * in the robust list and die. The parent thread will wait on this futex, and
>    * should be waken up when the child exits.
>    */
> -TEST(test_robustness)
> +TEST_F(robust_api, test_robustness)
>   {
>   	struct lock_struct lock = { .futex = 0 };
>   	atomic_futex_t *futex = &lock.futex;
>   	struct robust_list_head head;
> -	int ret, pid, wstatus;
> +	int ret, pid, wstatus, index;
>   
> -	ret = set_list(&head);
> -	ASSERT_EQ(ret, 0);
> +	lock.robust2 = variant->robust2;
> +
> +	ret = set_list(&head, lock.robust2, &index);
> +	ASSERT_NE(ret, -1);
>   
>   	/*
>   	 * Lets use a barrier to ensure that the child thread takes the lock
> @@ -281,7 +379,7 @@ TEST(test_set_robust_list_invalid_size)
>   	int ret;
>   
>   	ret = set_robust_list(&head, head_size);
> -	ASSERT_EQ(ret, 0);
> +	ASSERT_GE(ret, 0);
>   
>   	ret = set_robust_list(&head, head_size * 2);
>   	ASSERT_EQ(ret, -1);
> @@ -296,6 +394,40 @@ TEST(test_set_robust_list_invalid_size)
>   	ASSERT_EQ(errno, EINVAL);
>   }
>   
> +/*
> + * Test invalid parameters
> + */
> +TEST(test_set_robust_list2_inval)
> +{
> +	struct robust_list_head head;
> +	int i, ret, index, list_limit;
> +
> +	if (!robust_list2_support())
> +		SKIP(return, "robust_list2 not supported\n");
> +
> +	/* Bad flag */
> +	ret = set_robust_list2(&head, 0, 999);
> +	ASSERT_EQ(ret, -1);
> +	ASSERT_EQ(errno, EINVAL);
> +
> +	/* List out of range */
> +	list_limit = robust_list2_get_list_limit();
> +	ASSERT_GT(list_limit, 1);
> +
> +	for (i = 0; i < list_limit; i++) {
> +		ret = set_list(&head, true, &index);
> +		ASSERT_EQ(ret, i);
> +	}
> +
> +	ret = set_list(&head, true, &index);
> +	ASSERT_EQ(ret, -1);
> +	ASSERT_EQ(errno, ENOSPC);
> +
> +	/* clear the list */
> +	for (i = 0; i < list_limit; i++)
> +		modify_list(NULL, i);
> +}
> +
>   /*
>    * Test get_robust_list with pid = 0, getting the list of the running thread
>    */
> @@ -388,12 +520,12 @@ static int child_fn_lock_with_error(void *arg)
>   	struct __test_metadata *_metadata = cargs->_metadata;
>   	struct lock_struct *lock = cargs->arg;
>   	struct robust_list_head head;
> -	int ret;
> +	int ret, index;
>   
>   	free(cargs);
>   
> -	ret = set_list(&head);
> -	ASSERT_EQ(ret, 0)
> +	ret = set_list(&head, lock->robust2, &index);
> +	ASSERT_NE(ret, -1)
>   		TH_LOG("set_robust_list error");
>   
>   	ret = mutex_lock(lock, &head, true);
> @@ -413,15 +545,17 @@ static int child_fn_lock_with_error(void *arg)
>    * earlier, just after setting list_op_pending and taking the lock, to test the
>    * list_op_pending mechanism
>    */
> -TEST(test_set_list_op_pending)
> +TEST_F(robust_api, test_set_list_op_pending)
>   {
>   	struct lock_struct lock = { .futex = 0 };
>   	atomic_futex_t *futex = &lock.futex;
>   	struct robust_list_head head;
> -	int ret, wstatus;
> +	int ret, wstatus, index;
>   
> -	ret = set_list(&head);
> -	ASSERT_EQ(ret, 0);
> +	lock.robust2 = variant->robust2;
> +
> +	ret = set_list(&head, lock.robust2, &index);
> +	ASSERT_NE(ret, -1);
>   
>   	ret = pthread_barrier_init(&barrier, NULL, 2);
>   	ASSERT_EQ(ret, 0);
> @@ -450,11 +584,11 @@ static int child_lock_holder(void *arg)
>   	struct child_args *cargs = arg;
>   	struct lock_struct *locks = cargs->arg;
>   	struct robust_list_head head;
> -	int i;
> +	int i, index;
>   
>   	free(cargs);
>   
> -	set_list(&head);
> +	set_list(&head, locks[0].robust2, &index);
>   
>   	for (i = 0; i < CHILD_NR; i++) {
>   		locks[i].futex = 0;
> @@ -495,17 +629,23 @@ static int child_wait_lock(void *arg)
>    * Test a robust list of more than one element. All the waiters should wake when
>    * the holder dies
>    */
> -TEST(test_robust_list_multiple_elements)
> +TEST_F(robust_api, test_robust_list_multiple_elements)
>   {
>   	struct lock_struct locks[CHILD_NR];
>   	pid_t pids[CHILD_NR + 1];
>   	int i, ret, wstatus;
>   
> +	if (variant->robust2 && !robust_list2_support())
> +		SKIP(return, "robust_list2 not supported\n");
> +
> +	locks[0].robust2 = variant->robust2;
> +
>   	ret = pthread_barrier_init(&barrier, NULL, 2);
>   	ASSERT_EQ(ret, 0);
>   	ret = pthread_barrier_init(&barrier2, NULL, CHILD_NR + 1);
>   	ASSERT_EQ(ret, 0);
>   
> +
>   	pids[0] = create_child(_metadata, &child_lock_holder, &locks);
>   	ASSERT_NE(pids[0], -1);
>   
> @@ -532,18 +672,112 @@ TEST(test_robust_list_multiple_elements)
>   		TH_LOG("One or more children failed");
>   }
>   
> +static int child_lock_holder_multiple_lists(void *arg)
> +{
> +	struct child_args *cargs = arg;
> +	struct __test_metadata *_metadata = cargs->_metadata;
> +	struct lock_struct *locks = cargs->arg;
> +	struct robust_list_head *heads;
> +	int i, list_limit, index, ret;
> +
> +	free(cargs);
> +
> +	list_limit = robust_list2_get_list_limit();
> +	ASSERT_GT(list_limit, 1);
> +
> +	heads = malloc(list_limit * sizeof(*heads));
> +	ASSERT_TRUE((uintptr_t) heads);
> +
> +	/*
> +	 * Try to clear any exiting list, ignore errors if they didn't exit
> +	 */
> +	for (i = 0; i < list_limit; i++)
> +		modify_list(NULL, i);
> +
> +	/*
> +	 * Given that this thread has no robust list attached yet, it should
> +	 * get as return all available lists in order [0, list_limit)
> +	 */
> +	for (i = 0; i < list_limit; i++) {
> +		ret = set_list(&heads[i], true, &index);
> +		ASSERT_EQ(ret, i);
> +		locks[i].futex = 0;
> +		mutex_lock(&locks[i], &heads[i], false);
> +	}
> +
> +	pthread_barrier_wait(&barrier);
> +	pthread_barrier_wait(&barrier2);
> +
> +	/* See comment at child_fn_lock() */
> +	usleep(SLEEP_US * 10);
> +
> +	return 0;
> +}
> +
> +/*
> + * Similar to test_robust_list_multiple_elements, but instead of one list with
> + * several elements, create several lists with one element.
> + */
> +TEST(test_robust_list_multiple_lists)
> +{
> +	int i, ret, wstatus, list_limit;
> +	struct lock_struct *locks;
> +	pid_t *pids;
> +
> +	if (!robust_list2_support())
> +		SKIP(return, "robust_list2 not supported\n");
> +
> +	list_limit = robust_list2_get_list_limit();
> +	ASSERT_GT(list_limit, 1);
> +
> +	locks = malloc(list_limit * sizeof(*locks));
> +	ASSERT_NE(locks, NULL);
> +
> +	pids = malloc(list_limit * sizeof(*pids));
> +	ASSERT_NE(pids, NULL);
> +
> +	ret = pthread_barrier_init(&barrier, NULL, 2);
> +	ASSERT_EQ(ret, 0);
> +	ret = pthread_barrier_init(&barrier2, NULL, list_limit + 1);
> +	ASSERT_EQ(ret, 0);
> +
> +	pids[0] = create_child(_metadata, &child_lock_holder_multiple_lists, locks);
> +
> +	/* Wait until the locker thread takes the look */
> +	pthread_barrier_wait(&barrier);
> +
> +	for (i = 0; i < list_limit; i++)
> +		pids[i+1] = create_child(_metadata, &child_wait_lock, &locks[i]);

Writes one past the end.

> +
> +	/* Wait for all children to return */
> +	ret = 0;
> +
> +	for (i = 0; i < list_limit; i++) {
> +		waitpid(pids[i], &wstatus, 0);
> +		if (WEXITSTATUS(wstatus))
> +			ret = -1;
> +	}
> +
> +	pthread_barrier_destroy(&barrier);
> +	pthread_barrier_destroy(&barrier2);
> +
> +	free(locks);
> +	free(pids);
> +}

The last waiter (the one that hoses the heap) is never waited on. Also, 
ret is neatly assembled and then never checked :)
(incidentally, also hoses the heap from the child itself, since it 
shares memory for locks and that can get freed before it exits, since it 
isn't waited on, but more of a side effect than anything else :p)

> +
>   static int child_circular_list(void *arg)
>   {
>   	struct child_args *cargs = arg;
> +	bool robust2 = cargs->arg;
>   	struct __test_metadata *_metadata = cargs->_metadata;
>   	static struct lock_struct a, b, c;
>   	struct robust_list_head head;
> -	int ret;
> +	int ret, index;
>   
>   	free(cargs);
>   
> -	ret = set_list(&head);
> -	ASSERT_EQ(ret, 0)
> +	ret = set_list(&head, robust2, &index);
> +	ASSERT_NE(ret, -1)
>   		TH_LOG("set_list error");
>   
>   	head.list.next = &a.list;
> @@ -563,11 +797,13 @@ static int child_circular_list(void *arg)
>    * while processing it so it won't be trapped in an infinite loop while handling
>    * a process exit
>    */
> -TEST(test_circular_list)
> +TEST_F(robust_api, test_circular_list)
>   {
> +	bool robust2 = variant->robust2;
>   	int wstatus;
>   	pid_t pid;
>   
> +	create_child(_metadata, child_circular_list, (void *) robust2);

Is it normal that this doesn't save/check pid and etc.?

>   	pid = create_child(_metadata, child_circular_list, NULL);
>   	ASSERT_NE(pid, -1);
>   
> @@ -660,8 +896,8 @@ TEST_F(vdso_unlock, test_robust_try_unlock_uncontended)
>   
>   	*futex = tid;
>   
> -	ret = set_list(&head);
> -	if (ret)
> +	ret = set_list(&head, false, NULL);
> +	if (ret == -1)
>   		ksft_test_result_fail("set_robust_list error\n");
>   
>   	head.list_op_pending = &lock.list;
> @@ -700,8 +936,8 @@ TEST_F(vdso_unlock, test_robust_try_unlock_contended)
>   
>   	*futex = tid | FUTEX_WAITERS;
>   
> -	ret = set_list(&head);
> -	if (ret)
> +	ret = set_list(&head, false, NULL);
> +	if (ret == -1)
>   		ksft_test_result_fail("set_robust_list error\n");
>   
>   	head.list_op_pending = &lock.list;
> @@ -783,8 +1019,8 @@ TEST_F(futex_op, test_futex_robust_unlock)
>   
>   	*futex = tid | FUTEX_WAITERS;
>   
> -	ret = set_list(&head);
> -	if (ret)
> +	ret = set_list(&head, false, 0);
> +	if (ret == -1)
>   		ksft_test_result_fail("set_robust_list error\n");
>   
>   	head.list_op_pending = &lock.list;
> @@ -806,4 +1042,143 @@ TEST_F(futex_op, test_futex_robust_unlock)
>   	ASSERT_EQ((uintptr_t)(unsigned long)head.list_op_pending, exp);
>   }
>   
> +/*
> + * 32-bit version of child_lock_holder.
> + */
> +static int child_lock_holder32(void *arg)
> +{
> +	struct child_args *cargs = arg;
> +	struct lock_struct32 *locks = cargs->arg;
> +	struct __test_metadata *_metadata = cargs->_metadata;
> +	struct robust_list_head32 *head;
> +	pid_t tid = gettid();
> +	int i, ret;
> +
> +	head = mmap((void *)0x10000, sizeof(*head), PROT_READ | PROT_WRITE,
> +		    MAP_FIXED_NOREPLACE | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
> +
> +	ASSERT_TRUE((uintptr_t) head);

mmap returns MAP_FAILED on failure, not NULL

> +	ASSERT_LT(((uint32_t)(uintptr_t) head), 0x7FFFFFFF);
> +
> +	head->futex_offset = (uint32_t) ((size_t) offsetof(struct lock_struct32, futex) -
> +			     (size_t) offsetof(struct lock_struct32, list));
> +	head->list.next = (uint32_t)(uintptr_t) &head->list;
> +	head->list_op_pending = (uint32_t)(uintptr_t) NULL;
> +
> +	ret = set_robust_list2((struct robust_list_head *) head, 0,
> +				FUTEX_ROBUST_LIST2_FLAG_NEW_ENTRY |
> +				FUTEX_ROBUST_LIST2_FLAG_32BIT_ENTRY);
> +	ASSERT_GE(ret, 0);
> +
> +	/*
> +	 * Take all the locks and insert them in the list
> +	 */
> +	for (i = 0; i < CHILD_NR; i++) {
> +		struct robust_list32 *list = &head->list;
> +
> +		locks[i].futex = tid;
> +
> +		while (list->next != (uint32_t)(uintptr_t) &head->list)
> +			list = (struct robust_list32 *)(uintptr_t) list->next;
> +
> +		list->next = (uint32_t)(uintptr_t) &locks[i].list;
> +		locks[i].list.next = (uint32_t)(uintptr_t) &head->list;
> +	}
> +
> +	pthread_barrier_wait(&barrier);
> +	pthread_barrier_wait(&barrier2);
> +
> +	/* See comment at child_fn_lock() */
> +	usleep(SLEEP_US);
> +
> +	/* Exit holding all the locks */
> +	return 0;
> +}
> +
> +static int child_wait_lock32(void *arg)
> +{
> +	struct child_args *cargs = arg;
> +	struct __test_metadata *_metadata = cargs->_metadata;
> +	struct lock_struct32 *lock = cargs->arg;
> +	atomic_futex_t *futex;
> +	struct timespec to;
> +	pid_t tid;
> +	int ret;
> +
> +	futex = &lock->futex;
> +
> +	pthread_barrier_wait(&barrier2);
> +
> +	to.tv_sec = FUTEX_TIMEOUT;
> +	to.tv_nsec = 0;
> +
> +	tid = atomic_load(futex);
> +
> +	/* Kernel ignores futexes without the waiters flag */
> +	tid |= FUTEX_WAITERS;
> +	atomic_store(futex, tid);
> +
> +	ret = futex_wait((futex_t *) futex, tid, &to, 0);
> +
> +	ASSERT_EQ(ret, 0);
> +	ASSERT_TRUE(lock->futex & FUTEX_OWNER_DIED);
> +
> +	return 0;
> +}
> +
> +/*
> + * Test to create a 32-bit robust list in a 64-bit kernel. Replicate
> + * test_robust_list_multiple_elements, but it's simplified: don't do all the
> + * mutex lock dance, just insert futexes in the list and check if the kernel
> + * correctly walks the list and wake the threads
> + */
> +TEST(test_32bit_lists)
> +{
> +	struct lock_struct32 *locks;
> +	pid_t pids[CHILD_NR + 1];
> +	int i, ret, wstatus;
> +
> +#ifndef BUILD_64
> +	SKIP(return, "Test only for 64-bit\n");
> +#endif
> +
> +	if (!robust_list2_support())
> +		SKIP(return, "robust_list2 not supported\n");
> +
> +	locks = mmap((void *)0x20000, sizeof(*locks) * CHILD_NR,
> +		     PROT_READ | PROT_WRITE,
> +		     MAP_FIXED_NOREPLACE | MAP_PRIVATE | MAP_ANONYMOUS,
> +		     -1, 0);
> +
> +	ASSERT_NE(locks, NULL);

mmap returns MAP_FAILED on failure, not NULL

> +	ASSERT_LT((uintptr_t) locks, 0x7FFFFFFF);
> +
> +	ret = pthread_barrier_init(&barrier, NULL, 2);
> +	ASSERT_EQ(ret, 0);
> +	ret = pthread_barrier_init(&barrier2, NULL, CHILD_NR + 1);
> +	ASSERT_EQ(ret, 0);
> +
> +	pids[0] = create_child(_metadata, &child_lock_holder32, locks);
> +
> +	/* Wait until the locker thread takes the look */
> +	pthread_barrier_wait(&barrier);
> +
> +	for (i = 0; i < CHILD_NR; i++)
> +		pids[i+1] = create_child(_metadata, &child_wait_lock32, &locks[i]);
> +
> +	/* Wait for all children to return */
> +	ret = 0;
> +
> +	for (i = 0; i < CHILD_NR; i++) {
> +		waitpid(pids[i], &wstatus, 0);
> +		if (WEXITSTATUS(wstatus))
> +			ret = -1;
> +	}
> +
> +	pthread_barrier_destroy(&barrier);
> +	pthread_barrier_destroy(&barrier2);
> +
> +	munmap(locks, sizeof(*locks) * CHILD_NR);
> +}

Also off-by-one in the wait loop as in test_robust_list_multiple_lists, 
and fails to check ret (and can segfault that last unwaited child from 
munmap as a side effect :p).

> +
>   TEST_HARNESS_MAIN
> 


  reply	other threads:[~2026-12-06 16:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 16:15 [PATCH v9 00/14] futex: Create {set,get}_robust_list2() syscalls André Almeida
2026-12-04 16:15 ` [PATCH v9 01/14] futex: Use explicit sizes for compat_robust_list structs André Almeida
2026-12-04 16:15 ` [PATCH v9 02/14] futex: Make exit_robust_list32() unconditionally available for 64-bit kernels André Almeida
2026-12-04 16:15 ` [PATCH v9 03/14] futex: Give a specific head pointer to exit_robust_list() André Almeida
2026-12-04 16:15 ` [PATCH v9 04/14] futex: Introduce futex_get_robust_lists() and futex_sched_data::robust_lists André Almeida
2026-12-06 15:42   ` [libc-coord] " Gabriel Ravier
2026-12-04 16:15 ` [PATCH v9 05/14] futex: Create exit_robust_lists() for multi-robust list André Almeida
2026-12-05  9:55   ` kernel test robot
2026-12-04 16:15 ` [PATCH v9 06/14] futex: Use the multi-robust list infrastructure for current syscalls André Almeida
2026-12-06 15:18   ` [libc-coord] " Gabriel Ravier
2026-12-06 15:45   ` Gabriel Ravier
2026-12-04 16:15 ` [PATCH v9 07/14] futex: Expose robust_list2 limits via sysctl André Almeida
2026-12-04 16:15 ` [PATCH v9 08/14] futex: Create syscall set_robust_list2() André Almeida
2026-12-06 15:47   ` [libc-coord] " Gabriel Ravier
2026-12-04 16:15 ` [PATCH v9 09/14] futex: Make futex_task_robust_list() get list by index André Almeida
2026-12-04 16:15 ` [PATCH v9 10/14] futex: Create get_robust_list2() syscall André Almeida
2026-12-04 16:15 ` [PATCH v9 11/14] futex: Wire up set_robust_list2 syscall André Almeida
2026-12-05  9:55   ` kernel test robot
2026-12-05  9:55   ` kernel test robot
2026-12-04 16:15 ` [PATCH v9 12/14] futex: Wire up get_robust_list2 syscall André Almeida
2026-12-04 16:15 ` [PATCH v9 13/14] selftests/futex: Expand for set_robust_list2() André Almeida
2026-12-06 16:03   ` Gabriel Ravier [this message]
2026-12-04 16:15 ` [PATCH v9 14/14] selftests/futex: Expand for get_robust_list2() André Almeida
2026-12-06 16:06   ` [libc-coord] " Gabriel Ravier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d93c73be-6ff7-4d4e-b26a-d95ad9087412@gmail.com \
    --to=gabravier@gmail.com \
    --cc=Sonicadvance1@gmail.com \
    --cc=andrealmeid@igalia.com \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=fweimer@redhat.com \
    --cc=kernel-dev@igalia.com \
    --cc=libc-coord@lists.openwall.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox