diff options
author | Dmitry Safonov <dima@arista.com> | 2019-11-12 01:27:15 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-01-14 12:20:59 +0100 |
commit | 70ddf65184ec1e8989322f35193e4fde7377f0cc (patch) | |
tree | 57c0c780122cece61b02950fe7c2ee6abd5457f1 /include | |
parent | e6b28ec65b6d433624a2c290073bc356c4fce914 (diff) | |
download | linux-70ddf65184ec1e8989322f35193e4fde7377f0cc.tar.bz2 |
x86/vdso: Zap vvar pages when switching to a time namespace
The VVAR page layout depends on whether a task belongs to the root or
non-root time namespace. Whenever a task changes its namespace, the VVAR
page tables are cleared and then they will be re-faulted with a
corresponding layout.
Co-developed-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191112012724.250792-27-dima@arista.com
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/time_namespace.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h index 6b7767f7df4a..04a2ba8b8a06 100644 --- a/include/linux/time_namespace.h +++ b/include/linux/time_namespace.h @@ -31,6 +31,9 @@ struct time_namespace { extern struct time_namespace init_time_ns; #ifdef CONFIG_TIME_NS +extern int vdso_join_timens(struct task_struct *task, + struct time_namespace *ns); + static inline struct time_namespace *get_time_ns(struct time_namespace *ns) { kref_get(&ns->kref); @@ -77,6 +80,12 @@ static inline ktime_t timens_ktime_to_host(clockid_t clockid, ktime_t tim) } #else +static inline int vdso_join_timens(struct task_struct *task, + struct time_namespace *ns) +{ + return 0; +} + static inline struct time_namespace *get_time_ns(struct time_namespace *ns) { return NULL; |