mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Tianyi Chen <hi@tychen.cc>, Andrew Morton <akpm@linux-foundation.org>
Cc: shuah@kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	jsavitz@redhat.com
Subject: Re: [PATCH v2 0/2] selftests/mm: Validate selections and scope memfd_secret setup
Date: Tue, 8 Sep 2026 12:15:50 +0200	[thread overview]
Message-ID: <adaade14-6ce5-4a7a-9510-8ff99ee66eca@kernel.org> (raw)
In-Reply-To: <178886112560.138404.1278745290043112298.mm-cli-v2-0@tychen.cc>

On 9/8/26 11:55, Tianyi Chen wrote:
> run_vmtests.sh can reach test setup after an invalid category selection,
> and its memfd_secret preparation can change ptrace_scope even when that
> category was not selected. These two patches address David's follow-up
> questions on the earlier getopts fix.
> 
> Patch 1 extends the getopts error handling to reject empty, whitespace-only
> and unknown category selections before setup. It uses the existing category
> list in usage() and normalizes separators, while preserving the default
> when -t is omitted and the existing environment-selection behavior.
> 
> Patch 2 gates memfd_secret preparation on category selection and executable
> presence. It retains the existing behavior when memfd_secret is selected;
> it does not add configuration restoration or otherwise change that test.
> 
> Changes in v2:
> - Rebase onto current mm-unstable.
> - Extend the original option-error patch with category validation.
> - Add a separate patch for the memfd_secret setup side effect.
> 
> Focused validation:
> - Bash syntax and strict checkpatch passed. All 30 documented categories
>   match the categories used by the script.
> - Parser checks cover omitted/default selections, empty environment values,
>   explicit empty -t, invalid options/categories, whitespace-separated lists
>   and command-line overrides of environment selections.
> - Twelve invalid-input cases and help were run through the full script in
>   a KVM guest. Invalid inputs exited with status 1 before test setup.
> - The real mmap category's three programs and memfd_secret passed in an
>   x86-64 KVM guest running Linux 7.3.0-rc1, including multi-category and
>   environment-selected runs.
> - The guest kernel lacks Yama. A disposable file bind-mounted at the actual
>   ptrace_scope path verified the shell's write condition: the old script
>   writes for an unrelated selection, the new script does not, and selected
>   executable memfd_secret retains the write. This checks script gating,
>   not Yama policy enforcement. Missing-executable behavior was also checked.
> 
> This was focused validation, not a run of the complete MM selftest suite.
> 
> Previous submission:
> https://lore.kernel.org/r/20260906135444.749144-1-hi@tychen.cc
> Review:
> https://lore.kernel.org/r/519ef70a-679c-455f-ba5f-3841730873a4@kernel.org
> 
> 
> Tianyi Chen (2):

For the future, don't send new versions in reply to old versions of a patch set.

-- 
Cheers,

David

      parent reply	other threads:[~2026-09-08 10:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ZTYJZT7Q8UU4.KPP9BUAAJVQO1@mailcore-89d674988-v7w7p>
2026-09-06 13:54 ` [PATCH RESEND] selftests/mm: Exit on invalid command-line options Tianyi Chen
2026-09-07 11:47   ` David Hildenbrand (Arm)
2026-09-08  9:55     ` Tianyi Chen
2026-09-08  9:55   ` [PATCH v2 0/2] selftests/mm: Validate selections and scope memfd_secret setup Tianyi Chen
2026-09-08  9:55     ` [PATCH v2 1/2] selftests/mm: Reject invalid test selections before running tests Tianyi Chen
2026-09-08 10:13       ` David Hildenbrand (Arm)
2026-09-08  9:55     ` [PATCH v2 2/2] selftests/mm: Only prepare ptrace_scope when memfd_secret is selected Tianyi Chen
2026-09-08 10:14       ` David Hildenbrand (Arm)
2026-09-08 10:15     ` David Hildenbrand (Arm) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adaade14-6ce5-4a7a-9510-8ff99ee66eca@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hi@tychen.cc \
    --cc=jsavitz@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®