From: ebiederm@xmission.com (Eric W. Biederman)
To: Vladimir Divjak <vladimir.divjak@bmw.de>
Cc: <oleg@redhat.com>, <jnewsome@torproject.org>,
<tglx@linutronix.de>, <akpm@linux-foundation.org>,
<asml.silence@gmail.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ptrace: exit: re-trigger PTRACE_EVENT_EXIT after coredump finished
Date: Mon, 22 Nov 2021 09:02:15 -0600 [thread overview]
Message-ID: <875ysknsi0.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <20211122005347.1467288-1-vladimir.divjak@bmw.de> (Vladimir Divjak's message of "Mon, 22 Nov 2021 01:53:47 +0100")
Vladimir Divjak <vladimir.divjak@bmw.de> writes:
> Re-trigger PTRACE_EVENT_EXIT
> (if one is requested with PTRACE_SEIZE setting PTRACE_O_TRACEEXIT option)
> for a process being core-dumped, after the coredump is finished.
>
> This enables a potential tracer - coredump user mode helper
> (or any other tracer started after the coredump was initiated)
> to receive the PTRACE_EVENT_EXIT for all threads of the crashing process.
>
> Rationale:
>
> For zapped threads, PTRACE_EVENT_EXIT is triggered early during do_exit(),
> before the point at which they sleep, waiting for
> coredump to finish - in exit_mm(), and before a potential
> coredump user mode helper process is launched.
>
> That makes it impossible for the coredump user mode helper process to
> receive PTRACE_EVENT_EXIT events for all threads of the crashing process,
> except for the thread handling the core-dump, which will trigger
> the PTRACE_EVENT_EXIT after the coredump has been finished.
Please test the latest kernel.
The coredump now stops much earlier than exit_mm, and PTRACE_EVENT_EXIT
is after the point the coredump stops.
If you need this functionality on older kernels it should be possible to
backport a subset of my changes without too much trouble
Eric
prev parent reply other threads:[~2021-11-22 15:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 0:53 Vladimir Divjak
2021-11-22 15:02 ` Eric W. Biederman [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=875ysknsi0.fsf@email.froward.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=asml.silence@gmail.com \
--cc=jnewsome@torproject.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=tglx@linutronix.de \
--cc=vladimir.divjak@bmw.de \
/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®