public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Revert "fs/exec: allow to unshare a time namespace on vfork+exec"
@ 2022-09-13 10:25 Andrei Vagin
  2022-09-13 10:25 ` [PATCH 1/2] Revert "selftests/timens: add a test for vfork+exit" Andrei Vagin
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Andrei Vagin @ 2022-09-13 10:25 UTC (permalink / raw)
  To: Kees Cook; +Cc: linux-kernel, Andrei Vagin

This reverts commits:
133e2d3e81de ("fs/exec: allow to unshare a time namespace on vfork+exec")
6342140db660 ("selftests/timens: add a test for vfork+exit")

Alexey pointed out a few undesirable side effects of the reverted change.
First, it doesn't take into account that CLONE_VFORK can be used with
CLONE_THREAD. Second, a child process doesn't enter a target time name-space,
if its parent dies before the child calls exec. It happens because the parent
clears vfork_done.

Eric W. Biederman suggests installing a time namespace as a task gets a new mm.
It includes all new processes cloned without CLONE_VM and all tasks that call
exec(). This is an user API change, but we think there aren't users that depend
on the old behavior.

It is too late to make such changes in this release, so let's roll back
this patch and introduce the right one in the next release.

Andrei Vagin (2):
  Revert "selftests/timens: add a test for vfork+exit"
  Revert "fs/exec: allow to unshare a time namespace on vfork+exec"

 fs/exec.c                                   |  7 --
 kernel/fork.c                               |  5 +-
 kernel/nsproxy.c                            |  3 +-
 tools/testing/selftests/timens/Makefile     |  2 +-
 tools/testing/selftests/timens/vfork_exec.c | 90 ---------------------
 5 files changed, 3 insertions(+), 104 deletions(-)
 delete mode 100644 tools/testing/selftests/timens/vfork_exec.c

-- 
2.37.2.789.g6183377224-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-13 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13 10:25 [PATCH 0/2] Revert "fs/exec: allow to unshare a time namespace on vfork+exec" Andrei Vagin
2022-09-13 10:25 ` [PATCH 1/2] Revert "selftests/timens: add a test for vfork+exit" Andrei Vagin
2022-09-13 10:25 ` [PATCH 2/2] Revert "fs/exec: allow to unshare a time namespace on vfork+exec" Andrei Vagin
2022-09-13 11:37 ` [PATCH 0/2] " Kees Cook
2022-09-13 16:35   ` Andrei Vagin
2022-09-13 17:40 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox