Skip to content

coredump: fix the ancient signal problems

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3coredump: only SIGKILL should interrupt the coredumping taskfs/coredump.c include/linux/sched.h kernel/signal.c+10 -100 replies
2/3coredump: ensure that SIGKILL always kills the dumping threadfs/coredump.c+8 -20 replies
3/3coredump: sanitize the setting of signal->group_exit_codefs/coredump.c+7 -50 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchMandeep Singh Baines
SeriesT-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] coredump: fix the ancient signal problems

Hello.

These problems are really annoying. I reported and tried to fix them in 2008 (see http://marc.info/?l=linux-kernel&m=121665710711931)
but nobody was interested.

Since then I had a lot of (to some degree contradictory) bug reports:
we do not want the interrupted coredumps (this is what the current code tries to achieve but the logic is very wrong), but at the same time some people blame the coredump because it is not interruptible.

And every time the discussion was confusing, it is not clear what should we actually do to make everyone happy.

Linus, et al, could you please ack/nack the intent? Of course I will appreciate if you can review the code, but what I am actually worried about is the user-visible change: the coredumping becomes killable but only by the _explicit_ SIGKILL, other fatal signals are "ignored".

The changes were not tested at all, I'll try to recheck everything and test this tomorrow. I am sending this series right now because I strongly believe that the recent -mm patches in this area are not right and should be dropped, and I also disagree with the pending v2.

Mandeep, just in case please note that 1/3 alone should fix the problems with non-fatal signals and wait_dump_helper(). As for the freezer, afaics we are almost ready for the (slightly modified) fix proposed in
http://marc.info/?l=linux-kernel&m=136103469831268.

Oleg.

 fs/coredump.c         |   33 +++++++++++++++++++--------------
 include/linux/sched.h |    1 +
 kernel/signal.c       |    6 ++++--
 3 files changed, 24 insertions(+), 16 deletions(-)