public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] futex: Drop ROBUST_LIST_LIMIT
@ 2025-01-27 20:26 André Almeida
  2025-01-27 20:26 ` [PATCH v2 1/4] " André Almeida
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: André Almeida @ 2025-01-27 20:26 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart,
	Davidlohr Bueso, Arnd Bergmann, Florian Weimer
  Cc: linux-kernel, kernel-dev, Vinicius Peixoto, André Almeida

As requested by Peter at [1], this patchset drops the ROBUST_LIST_LIMIT. This is
achieve by simply rewriting the processed list element ->next to point to the
head->list address, destroying the linked list to avoid any circular list.

Patches 2-4 create selftest for robust lists. Patch 2/4 creates helpful
macros for futex selftests and 3/4 creates a bunch of tests for the interface (as I
had submitted before at [2]).

Patch 4/4 is used to validate the changes made at 1/4:
 - That the kernel can now handle a lock that is allocated in an index bigger than
  ROBUST_LIST_LIMIT
 - That the kernel can still handle circular linked lists.

[1] https://lore.kernel.org/lkml/20241219171344.GA26279@noisy.programming.kicks-ass.net/
[2] https://lore.kernel.org/lkml/20241212210436.112076-1-andrealmeid@igalia.com/

Changelog:

- Rebased on top of tip/locking/urgent (for 6.14-rc1)
v1: https://lore.kernel.org/lkml/20250110200508.353290-1-andrealmeid@igalia.com/#t

André Almeida (4):
  futex: Drop ROBUST_LIST_LIMIT
  selftests/futex: Add ASSERT_ macros
  selftests/futex: Create test for robust list
  selftests/futex: Create tests for long and circular robust lists

 include/uapi/linux/futex.h                    |   3 +-
 kernel/futex/core.c                           |  13 +-
 .../selftests/futex/functional/.gitignore     |   1 +
 .../selftests/futex/functional/Makefile       |   3 +-
 .../selftests/futex/functional/robust_list.c  | 641 ++++++++++++++++++
 .../testing/selftests/futex/include/logging.h |  38 ++
 6 files changed, 690 insertions(+), 9 deletions(-)
 create mode 100644 tools/testing/selftests/futex/functional/robust_list.c

-- 
2.48.0


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

end of thread, other threads:[~2025-02-03 14:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27 20:26 [PATCH v2 0/4] futex: Drop ROBUST_LIST_LIMIT André Almeida
2025-01-27 20:26 ` [PATCH v2 1/4] " André Almeida
2025-01-27 20:26 ` [PATCH v2 2/4] selftests/futex: Add ASSERT_ macros André Almeida
2025-01-27 20:26 ` [PATCH v2 3/4] selftests/futex: Create test for robust list André Almeida
2025-01-27 20:26 ` [PATCH v2 4/4] selftests/futex: Create tests for long and circular robust lists André Almeida
2025-01-28  7:50 ` [PATCH v2 0/4] futex: Drop ROBUST_LIST_LIMIT Florian Weimer
2025-01-28 14:28   ` André Almeida
2025-01-28 20:35     ` Florian Weimer
2025-02-03 13:34       ` Peter Zijlstra
2025-02-03 13:29   ` Peter Zijlstra
2025-02-03 14:16     ` André Almeida

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