[PATCH 0/4] futex: Drop ROBUST_LIST_LIMIT

André Almeida posted 4 patches 1 year ago
There is a newer version of this series
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
[PATCH 0/4] futex: Drop ROBUST_LIST_LIMIT
Posted by André Almeida 1 year ago
Hey,

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.

Thanks,
	André

[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/

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.47.1