Re: [PATCH 1/2] fs/exec: switch timens when a task gets a new mm

From: Kees Cook
Date: Tue Oct 18 2022 - 03:21:49 EST


On Tue, 20 Sep 2022 17:31:19 -0700, Andrei Vagin wrote:
> From: Andrei Vagin <avagin@xxxxxxxxx>
>
> Changing a time namespace requires remapping a vvar page, so we don't want
> to allow doing that if any other tasks can use the same mm.
>
> Currently, we install a time namespace when a task is created with a new
> vm. exec() is another case when a task gets a new mm and so it can switch
> a time namespace safely, but it isn't handled now.
>
> [...]

Applied to for-next/execve, thanks!

[1/2] fs/exec: switch timens when a task gets a new mm
https://git.kernel.org/kees/c/f8e06046dd69
[2/2] selftests/timens: add a test for vfork+exit
https://git.kernel.org/kees/c/de8517320d01

--
Kees Cook