Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Nikolai Dokutovich <ndokutovich@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuah@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] selftests/mm: skip tests when FOLL_FORCE writes are denied
Date: Mon, 30 Nov 2026 12:15:53 +0100	[thread overview]
Message-ID: <d525bd1b-8fe3-4ae1-a878-070a51c7df55@kernel.org> (raw)
In-Reply-To: <20261129040025.37113-1-ndokutovich@gmail.com>

On 11/29/26 05:00, Nikolai Dokutovich wrote:
> A write through /proc/self/mem into a mapping that is not writable is
> performed by the kernel as a forced write.  Since commit
> 41e8149c8892 ("proc: add config & param to block forcing mem writes")
> such a write is refused unless the writing task is tracing the target
> task, the kernel was built with CONFIG_PROC_MEM_ALWAYS_FORCE, or it was
> booted with proc_mem.force_override=always.  Commit
> 599bbba5a36f ("proc: make PROC_MEM_FORCE_PTRACE the Kconfig default") made
> the refusal the default.
> 
> Commit a3907a3169d0 ("selftests/mm: specify requirement for
> PROC_MEM_ALWAYS_FORCE=y") set CONFIG_PROC_MEM_ALWAYS_FORCE=y in mm/config.
> That fragment is merged into the kernel configuration only when it is
> requested, so a test binary run against a distribution kernel is not
> covered, and mkdirty and the ksm PROT_NONE test then report failures
> instead of skipping:
> 
>     not ok 1 write() failed
>     not ok 5 ptrace write failed

Ran into this myself when testing stuff over the weekend.

-- 
Cheers,

David


  parent reply	other threads:[~2026-11-30 11:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29  4:00 [PATCH 0/3] selftests/mm: skip tests when FOLL_FORCE writes are denied Nikolai Dokutovich
2026-11-29  4:00 ` [PATCH 1/3] selftests/mm: add a probe for FOLL_FORCE writes through /proc/self/mem Nikolai Dokutovich
2026-11-30 11:16   ` David Hildenbrand (Arm)
2026-11-30 11:17   ` David Hildenbrand (Arm)
2026-11-29  4:00 ` [PATCH 2/3] selftests/mm: skip the mkdirty ptrace write tests without FOLL_FORCE Nikolai Dokutovich
2026-11-29  4:00 ` [PATCH 3/3] selftests/mm: skip the ksm PROT_NONE test " Nikolai Dokutovich
2026-11-30 11:15 ` David Hildenbrand (Arm) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-29  4:00 [PATCH 0/3] selftests/mm: skip tests when FOLL_FORCE writes are denied Nikolai Dokutovich
2026-11-29  4:04 ` Nikolai Dokutovich

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=d525bd1b-8fe3-4ae1-a878-070a51c7df55@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=ndokutovich@gmail.com \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=vbabka@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