Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Nicolas Pitre <nico@fluxnic.net>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Pedro Falcato <pfalcato@suse.de>, Jann Horn <jannh@google.com>,
	Jan Kara <jack@suse.cz>,
	Stephen Smalley <stephen.smalley.work@gmail.com>,
	Paul Moore <paul@paul-moore.com>, Chris Mason <mason@kernel.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, linux-mm@kvack.org,
	selinux@vger.kernel.org
Subject: Re: [PATCH v2 1/2] uprobes: skip mappings not managed by core mm
Date: Thu, 3 Dec 2026 14:53:26 +0100	[thread overview]
Message-ID: <axF0VqUwSjUTIZWY@redhat.com> (raw)
In-Reply-To: <20261203-cow_pfnmap_pgoff-v2-1-2e06735c100d@kernel.org>

On 12/03, David Hildenbrand (Arm) wrote:
>
> Further, since commit 83e3dc9a5d4d ("uprobes: simplify
> find_active_uprobe_rcu() VMA checks"), the uprobe lookups no longer check
> the VMA flags, assuming that a trap instruction in a VMA implies that we
> installed a breakpoint there. But we never install breakpoints into
> some VMAs, such as MAP_SHARED mappings. If the file itself contains a
> trap instruction at the offset of a uprobe, executing it in such a VMA
> will find the uprobe, and instead of delivering SIGTRAP, > we let the task
> loop on that trap instruction forever.

OK, I guess this can really happen if prepare_uprobe() wasn't called...

LGTM,

Acked-by: Oleg Nesterov <oleg@redhat.com>



  reply	other threads:[~2026-12-03 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 12:33 [PATCH v2 0/2] mm: don't leak PFNs of CoW PFNMAP mappings to user space David Hildenbrand (Arm)
2026-12-03 12:33 ` [PATCH v2 1/2] uprobes: skip mappings not managed by core mm David Hildenbrand (Arm)
2026-12-03 13:53   ` Oleg Nesterov [this message]
2026-12-03 12:33 ` [PATCH v2 2/2] mm/memory: store the PFN of CoW PFNMAP mappings in the anon page offset David Hildenbrand (Arm)
2026-12-03 13:47   ` Lorenzo Stoakes (ARM)

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=axF0VqUwSjUTIZWY@redhat.com \
    --to=oleg@redhat.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii@kernel.org \
    --cc=david@kernel.org \
    --cc=irogers@google.com \
    --cc=jack@suse.cz \
    --cc=james.clark@linaro.org \
    --cc=jannh@google.com \
    --cc=jolsa@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mason@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nico@fluxnic.net \
    --cc=paul@paul-moore.com \
    --cc=peterz@infradead.org \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=selinux@vger.kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=stephen.smalley.work@gmail.com \
    --cc=surenb@google.com \
    --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