diff options
author | Jann Horn <jannh@google.com> | 2022-11-30 14:53:20 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-12-01 13:35:40 +0300 |
commit | d6c494e8ee932b2b21ff4b718eebb378e91b3da0 (patch) | |
tree | 90dc53f17eb09172eda357d3c7fc5527b599d811 /include/linux/time_namespace.h | |
parent | e0d3da982c96aeddc1bbf1cf9469dbb9ebdca657 (diff) | |
download | linux-d6c494e8ee932b2b21ff4b718eebb378e91b3da0.tar.xz |
vdso/timens: Refactor copy-pasted find_timens_vvar_page() helper into one copy
find_timens_vvar_page() is not architecture-specific, as can be seen from
how all five per-architecture versions of it are the same.
(arm64, powerpc and riscv are exactly the same; x86 and s390 have two
characters difference inside a comment, less blank lines, and mark the
!CONFIG_TIME_NS version as inline.)
Refactor the five copies into a central copy in kernel/time/namespace.c.
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20221130115320.2918447-1-jannh@google.com
Diffstat (limited to 'include/linux/time_namespace.h')
-rw-r--r-- | include/linux/time_namespace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h index 3146f1c056c9..bb9d3f5542f8 100644 --- a/include/linux/time_namespace.h +++ b/include/linux/time_namespace.h @@ -45,6 +45,7 @@ struct time_namespace *copy_time_ns(unsigned long flags, void free_time_ns(struct time_namespace *ns); void timens_on_fork(struct nsproxy *nsproxy, struct task_struct *tsk); struct vdso_data *arch_get_vdso_data(void *vvar_page); +struct page *find_timens_vvar_page(struct vm_area_struct *vma); static inline void put_time_ns(struct time_namespace *ns) { @@ -141,6 +142,11 @@ static inline void timens_on_fork(struct nsproxy *nsproxy, return; } +static inline struct page *find_timens_vvar_page(struct vm_area_struct *vma) +{ + return NULL; +} + static inline void timens_add_monotonic(struct timespec64 *ts) { } static inline void timens_add_boottime(struct timespec64 *ts) { } |