#include <linux/mm.h>
#include <linux/err.h>
#include <linux/sched.h>
#include <linux/sched/task_stack.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/random.h>
#include <linux/elf.h>
#include <linux/cpu.h>
#include <linux/ptrace.h>
#include <linux/time_namespace.h>
#include <asm/pvclock.h>
#include <asm/vgtod.h>
#include <asm/proto.h>
#include <asm/vdso.h>
#include <asm/vvar.h>
#include <asm/tlb.h>
#include <asm/page.h>
#include <asm/desc.h>
#include <asm/cpufeature.h>
#include <clocksource/hyperv_timer.h>
#undef _ASM_X86_VVAR_H
#define EMIT_VVAR …
#include <asm/vvar.h>
struct vdso_data *arch_get_vdso_data(void *vvar_page)
{ … }
#undef EMIT_VVAR
unsigned int vclocks_used __read_mostly;
#if defined(CONFIG_X86_64)
unsigned int __read_mostly vdso64_enabled = …;
#endif
int __init init_vdso_image(const struct vdso_image *image)
{ … }
static const struct vm_special_mapping vvar_mapping;
struct linux_binprm;
static vm_fault_t vdso_fault(const struct vm_special_mapping *sm,
struct vm_area_struct *vma, struct vm_fault *vmf)
{ … }
static void vdso_fix_landing(const struct vdso_image *image,
struct vm_area_struct *new_vma)
{ … }
static int vdso_mremap(const struct vm_special_mapping *sm,
struct vm_area_struct *new_vma)
{ … }
#ifdef CONFIG_TIME_NS
int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
{ … }
#endif
static vm_fault_t vvar_fault(const struct vm_special_mapping *sm,
struct vm_area_struct *vma, struct vm_fault *vmf)
{ … }
static const struct vm_special_mapping vdso_mapping = …;
static const struct vm_special_mapping vvar_mapping = …;
static int map_vdso(const struct vdso_image *image, unsigned long addr)
{ … }
int map_vdso_once(const struct vdso_image *image, unsigned long addr)
{ … }
#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
static int load_vdso32(void)
{ … }
#endif
#ifdef CONFIG_X86_64
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
{ … }
#ifdef CONFIG_COMPAT
int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
int uses_interp, bool x32)
{ … }
#endif
#else
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
{
return load_vdso32();
}
#endif
bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
{ … }
#ifdef CONFIG_X86_64
static __init int vdso_setup(char *s)
{ … }
__setup(…);
#endif