Thread (2 messages) 2 messages, 2 authors, 2021-06-09

Re: [RFC] coredump: Do not interrupt dump for TIF_NOTIFY_SIGNAL

From: Olivier Langlois <hidden>
Date: 2021-06-09 21:02:10
Also in: linux-fsdevel, lkml

Possibly related (same subject, not in this thread)

On Wed, 2021-06-09 at 13:33 -0700, Linus Torvalds wrote:
Now, the fact that we haven't cleared TIF_NOTIFY_SIGNAL for the first
signal is clearly the immediate cause of this, but at the same time I
really get the feeling that that coredump aborting code should always
had used fatal_signal_pending().
I need clarify what does happen with the io_uring situation. If
somehow, TIF_NOTIFY_SIGNAL wasn't cleared, I would get all the time a 0
byte size core dump because do_coredump() does check if the dump is
interrupted before writing a single byte.

io_uring is quite a strange animal. AFAIK, the common pattern to use a
wait_queue is to insert a task into it and then put that task to sleep
until the waited event occur.

io_uring place tasks into wait queues and then let the the task return
to user space to do some other stuff (like core dumping). I would guess
that it is the main reason for it using the task_work feature.

So the TIF_NOTIFY_SIGNAL does get set WHILE the core dump is written.

Greetings,
Olivier

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help