Skip to content

RFC mt-exec: fix deadlock with ptrace_attach()

Oleg Nesterov linux-fsdevel linux-integrity linux-kselftest linux-mm linux-security-module lkml oe-kbuild-all selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3exec: make setup_new_exec() return intfs/binfmt_elf.c fs/binfmt_elf_fdpic.c fs/binfmt_flat.c +2 more+13 -50 replies
2/3exec: don't wait for zombie threads with cred_guard_mutex heldfs/exec.c kernel/exit.c kernel/signal.c+71 -804 replies
3/3ptrace: ensure PTRACE_EVENT_EXIT won't stop if the tracee is killed by execkernel/signal.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] mt-exec: fix deadlock with ptrace_attach()

Not for inclusion yet. 2/2 is untested, incomplete, possibly buggy.

But could you review at least the intent? Do you see any problem with this approach?

This problem is very, very old. It seems that nobody can suggest a simple/clean fix...

Oleg.
---

 fs/binfmt_elf.c         |   4 +-
 fs/binfmt_elf_fdpic.c   |   4 +-
 fs/binfmt_flat.c        |   4 +-
 fs/exec.c               | 142 +++++++++++++++++++++++-------------------------
 include/linux/binfmts.h |   2 +-
 kernel/exit.c           |   9 +--
 kernel/signal.c         |   6 +-
 7 files changed, 87 insertions(+), 84 deletions(-)