lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250110200508.353290-1-andrealmeid@igalia.com>
Date: Fri, 10 Jan 2025 17:05:04 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Darren Hart <dvhart@...radead.org>,
	Davidlohr Bueso <dave@...olabs.net>,
	Arnd Bergmann <arnd@...db.de>,
	Florian Weimer <fweimer@...hat.com>
Cc: linux-kernel@...r.kernel.org,
	kernel-dev@...lia.com,
	Vinicius Peixoto <vpeixoto@...amp.dev>,
	André Almeida <andrealmeid@...lia.com>
Subject: [PATCH 0/4] futex: Drop ROBUST_LIST_LIMIT

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ