]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/vdso: Zap vvar pages when switching to a time namespace
authorAndrei Vagin <avagin@gmail.com>
Wed, 24 Jun 2020 08:33:17 +0000 (01:33 -0700)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 24 Jul 2020 12:15:20 +0000 (13:15 +0100)
commit813569899a5e9c512eae6562d5f5295da527b442
tree67255f70f601dd2b36f710d886ab39682f742cbd
parent07cc5af11c5df2bff4b4ba92cc7728af9e349f73
arm64/vdso: Zap vvar pages when switching to a time namespace

The order of vvar pages depends on whether a task belongs to the root
time namespace or not. In the root time namespace, a task doesn't have a
per-namespace page. In a non-root namespace, the VVAR page which contains
the system-wide VDSO data is replaced with a namespace specific page
that contains clock offsets.

Whenever a task changes its namespace, the VVAR page tables are cleared
and then they will be re-faulted with a corresponding layout.

A task can switch its time namespace only if its ->mm isn't shared with
another task.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20200624083321.144975-3-avagin@gmail.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/vdso.c