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: <20250501163827.2598-1-ujwal.kundur@gmail.com>
Date: Thu,  1 May 2025 22:08:23 +0530
From: Ujwal Kundur <ujwal.kundur@...il.com>
To: akpm@...ux-foundation.org,
	peterx@...hat.com,
	shuah@...nel.org
Cc: linux-mm@...ck.org,
	linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Ujwal Kundur <ujwal.kundur@...il.com>
Subject: [PATCH 0/4] selftests/mm/uffd: refactor global variables

This patchset refactors non-composite global variables into a common
struct that can be initialized and passed around per-test instead of
relying on the presence of global variables.

This allows:
- Better encapsulation
- Debugging becomes easier -- local variable state can be viewed per
  stack frame, and we can more easily reason about the variable
  mutations

Patch 1 needs to be applied first and can be followed by any of the
other patches.
I've ensured that the tests are passing locally (or atleast have the
same output as the code on master).

Ujwal Kundur (4):
  selftests/mm/uffd: Refactor non-composite global vars into struct
  selftests/mm/uffd: Swap global vars with global test options
  selftests/mm/uffd: Swap global variables with global test opts
  selftests/mm/uffd: Swap global variables with global test opts

 tools/testing/selftests/mm/uffd-common.c     | 269 +++++-----
 tools/testing/selftests/mm/uffd-common.h     |  78 +--
 tools/testing/selftests/mm/uffd-stress.c     | 226 ++++----
 tools/testing/selftests/mm/uffd-unit-tests.c | 523 ++++++++++---------
 tools/testing/selftests/mm/uffd-wp-mremap.c  |  23 +-
 5 files changed, 591 insertions(+), 528 deletions(-)

-- 
2.20.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ