mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 RESEND 0/2] selftests/mm: Validate selections and scope memfd_secret setup
@ 2026-09-09 14:54 Tianyi Chen
  2026-09-09 14:54 ` [PATCH v3 RESEND 1/2] selftests/mm: Reject invalid test selections before running tests Tianyi Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tianyi Chen @ 2026-09-09 14:54 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand
  Cc: Shuah Khan, linux-mm, linux-kselftest, linux-kernel, Joel Savitz,
	Tianyi Chen

run_vmtests.sh can reach test setup after invalid options or category
selections. Its memfd_secret preparation can also change ptrace_scope
when that category was not selected.

Patch 1 rejects invalid selections before setup, using the category list
in usage(). Patch 2 gates memfd_secret preparation on category selection
and executable presence.

I am resending from my Gmail address after delivery problems with my
previous address. I could not confirm delivery of the earlier v3 posting.
This series is rebased onto current mm-unstable; both patches are unchanged
from v3 according to range-diff. Neither fix is present in current
mm-unstable, mm-stable or mainline.

Changes in v3:
- Initialize VM_SELFTEST_ITEMS to "default" before getopts, as David
  suggested. Only -t changes the selection.
- Use Assisted-by: LLM in both patches.
- Add David's Acked-by to patch 2, whose code is unchanged from v2.

Validation after rebasing:
- Bash syntax, whitespace and checkpatch checks passed.
- Ten invalid option/category invocations and help passed before setup.
- Rebuilt the four focused test binaries and ran the rebased script in an
  x86-64 KVM guest. mmap, memfd_secret, combined selections, tab/newline
  separators and repeated -t with the final selection taking effect all
  passed.
- The guest lacks Yama. The ptrace_scope write condition was checked with
  a disposable file at the expected path, not Yama policy enforcement.

This is focused validation, not a run of the complete MM selftest suite.

v2: https://lore.kernel.org/r/178886112560.138404.1278745290043112298.mm-cli-v2-0@tychen.cc

Tianyi Chen (2):
  selftests/mm: Reject invalid test selections before running tests
  selftests/mm: Only prepare ptrace_scope when memfd_secret is selected

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH v3 RESEND 0/2] selftests/mm: Validate selections and scope memfd_secret setup
@ 2026-09-10 12:56 Tianyi Chen
  0 siblings, 0 replies; 8+ messages in thread
From: Tianyi Chen @ 2026-09-10 12:56 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand
  Cc: Shuah Khan, linux-mm, linux-kselftest, linux-kernel, Joel Savitz

run_vmtests.sh can reach test setup after invalid options or category
selections. Its memfd_secret preparation can also change ptrace_scope
when that category was not selected.

Patch 1 rejects invalid selections before setup. Patch 2 gates
memfd_secret preparation on category selection and executable presence.

The patches and commit messages are unchanged from v3. This resend uses
git send-email through Gmail's SMTP server to send the patches inline.
Before resending, I sent them to my SpaceMail mailbox and verified the
received contents and whitespace. Both patches passed git apply --check
and git am, and the resulting trees matched the original commits.

David, this is my first time setting up Gmail SMTP for patch submission.
I'm very sorry for the formatting problems I caused and for taking up
so much of your time. Thank you for your patience.

Changes in v3:
- Initialize VM_SELFTEST_ITEMS to "default" before getopts, as David
  suggested. Only -t changes the selection.
- Use Assisted-by: LLM in both patches.
- Carry David's Acked-by on patch 2, unchanged from v2.

Tianyi Chen (2):
  selftests/mm: Reject invalid test selections before running tests
  selftests/mm: Only prepare ptrace_scope when memfd_secret is selected

 tools/testing/selftests/mm/run_vmtests.sh | 28 +++++++++++++++++++----
 1 file changed, 23 insertions(+), 5 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-09-10 12:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-09 14:54 [PATCH v3 RESEND 0/2] selftests/mm: Validate selections and scope memfd_secret setup Tianyi Chen
2026-09-09 14:54 ` [PATCH v3 RESEND 1/2] selftests/mm: Reject invalid test selections before running tests Tianyi Chen
2026-09-09 14:54 ` [PATCH v3 RESEND 2/2] selftests/mm: Only prepare ptrace_scope when memfd_secret is selected Tianyi Chen
2026-09-09 14:54 ` [PATCH v3 RESEND 0/2] selftests/mm: Validate selections and scope memfd_secret setup Tianyi Chen
2026-09-09 15:02   ` David Hildenbrand (Arm)
2026-09-09 15:04     ` David Hildenbrand (Arm)
2026-09-09 15:25       ` Tianyi Chen
2026-09-10 12:56 Tianyi Chen

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

all inboxes | Powered by JetHome®