Skip to content

(Was: self_exec_id/parent_exec_id && CLONE_PARENT)

Oleg Nesterov kernel-hardening linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1CLONE_PARENT shouldn't allow to set ->exit_signalkernel/fork.c+7 -12 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/1] (Was: self_exec_id/parent_exec_id && CLONE_PARENT)
Quoted 13 lines · Linus Torvalds
Quoted 7 lines · Oleg Nesterov

I am also asking because the change above looks like the fix to me. The child must not control its ->exit_signal, it is the parent who decides which signal the child should use for notification.

And to me, clone(CLONE_PARENT | SIGXXX) looks like a violation of rule above.

SIGXXX is for doing things like AIO with threads, but it would never be used together with CLONE_PARENT, that would be odd and wrong.

Quoted 8 lines

So I think we could disallow that - or at least try. See if anybody notices, and if it breaks anything.

The rule about the Linux ABI is not that the ABI is set in stone. It's that we can't break any existing binaries. And *maybe* there are users of CLONE_PARENT and special signals, but it sounds unlikely and would probably confuse real programs. So feel free to just try it (early in the 3.4 merge window - not at this point, though).

OK, nobody seems to object.

Andrew, could you take this patch?

As for self_exec_id/parent_exec_id, this needs cleanups and fixes in any case. But perhaps we can kill them after this change.

Oleg.