linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Keke Ming <ming.jvle@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] uprobes: Free utask on dup_return_instance() failure
Date: Tue, 25 Aug 2026 14:26:53 +0200	[thread overview]
Message-ID: <ao2KDQuBMNtONu0K@redhat.com> (raw)
In-Reply-To: <CAEf4BzbUQWAB0JuEdXu32v4S_zMuv4de+kYv0mcY4tDPu8CA2Q@mail.gmail.com>

On 08/24, Andrii Nakryiko wrote:
>
> On Mon, Aug 24, 2026 at 8:57 AM Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > force_exit_sig(SIGILL) can't be ignored too. But I am fine either way.
>
> Current SIGILL sending is already pretty bad behavior that bites us
> periodically, instead of doubling down on killing the user space
> process because something about installing uprobe goes wrong, let's
> think about a bit less destructive way to do this. Mark uprobe for a
> particular process as defunct or "detaching it", or something along
> those lines. But not just kill innocent processes.

Well. Yes, SIGILL sending acts as BUG_ON(), this is not nice and
probably we can improve the current code. And, just in case, as for
uprobe_copy_process() in particular I agree that Option B (make fork()
fail) is better.

But what, say, uprobe_handle_trampoline() can do if ->return_instances
is NULL? Either we have a kernel bug, or the probed task does something
wrong. In both cases it is better to kill the task with pr_warn() and
generate the core dump.

Oleg.


  reply	other threads:[~2026-08-25 12:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22  5:46 [PATCH] uprobes: Free utask on dup_return_instance() failure Keke Ming
2026-08-22  6:00 ` sashiko-bot
2026-08-23 12:02   ` Masami Hiramatsu
2026-08-23 13:00     ` Keke Ming
2026-08-22 15:09 ` [PATCH v2] " Keke Ming
2026-08-22 15:16   ` sashiko-bot
2026-08-23 15:38 ` [PATCH] " Oleg Nesterov
2026-08-23 16:26   ` Keke Ming
2026-08-23 19:41     ` Oleg Nesterov
2026-08-24 11:22       ` Keke Ming
2026-08-24 15:57         ` Oleg Nesterov
2026-08-24 19:54           ` Andrii Nakryiko
2026-08-25 12:26             ` Oleg Nesterov [this message]
2026-08-25 16:38               ` Andrii Nakryiko
2026-08-25 18:23                 ` SIGILL and uretprobes, WAS: " Andrii Nakryiko
2026-08-26 11:49                   ` Oleg Nesterov
2026-08-27 16:44                     ` Andrii Nakryiko

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=ao2KDQuBMNtONu0K@redhat.com \
    --to=oleg@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=ming.jvle@gmail.com \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).