Re: [PATCH v4] coredump: Add /proc/<pid>/coredump_pre_exit for pre-exit before dumping
From: Xin Zhao
Date: Tue Jun 30 2026 - 04:12:20 EST
Dear Christian,
On Thu, 25 Jun 2026 09:28:08 +0200 Christian Brauner <brauner@xxxxxxxxxx> wrote:
> Nah, we're not doing a separate file for this. That makes no sense
> whatsoever. I've already explained this in the first mail. There are
> effectively three modes:
>
> (1) dump to a file
> (2) spawn super-privileged usermode helper process connect coredumping
> process and said helper via pipe
> (3) coredumping process connects to AF_UNIX socket
>
> Parameterize (1) and (2) via a command line arguments. I strongly
> suspect you're using some AI tooling so it should be able to figure out
> how this was done in the past.
>
> (3) can be extended by just introducing a new flag value for struct
> coredump_req. That is also illustrated by previous work.
>
> We're not spreading procfs files. It's terrible api design especially
> for security sensitive changes.
I am unsure whether the addition of a bit 9 for coredump_filter in version
v5 will be acceptable to everyone, as there are still many projects using
the coredump file and coredump pipe mechanisms. I found that coredump
files are used in elf_coredump_extra_notes_write, which makes it difficult
to distinguish between these two types and determine whether early release
of the files is possible without setting parameters. I am reluctant to add
another bit for this purpose, but it seems necessary. I am not sure if my
understanding is correct or if you have better suggestions, as I really do
not want to address only the coredump socket situation.
Thanks
Xin Zhao