bde435998f3aa06ee39c466947f59b2c5e135d57
[firefly-linux-kernel-4.4.55.git] / arch / x86 / include / asm / vdso.h
1 #ifndef _ASM_X86_VDSO_H
2 #define _ASM_X86_VDSO_H
3
4 #if defined CONFIG_X86_32 || defined CONFIG_COMPAT
5
6 #include <asm/vdso32.h>
7
8 extern const char VDSO32_PRELINK[];
9
10 /*
11  * Given a pointer to the vDSO image, find the pointer to VDSO32_name
12  * as that symbol is defined in the vDSO sources or linker script.
13  */
14 #define VDSO32_SYMBOL(base, name)                                       \
15 ({                                                                      \
16         extern const char VDSO32_##name[];                              \
17         (void __user *)(VDSO32_##name + (unsigned long)(base));         \
18 })
19 #endif
20
21 /*
22  * These symbols are defined with the addresses in the vsyscall page.
23  * See vsyscall-sigreturn.S.
24  */
25 extern void __user __kernel_sigreturn;
26 extern void __user __kernel_rt_sigreturn;
27
28 /*
29  * These symbols are defined by vdso32.S to mark the bounds
30  * of the ELF DSO images included therein.
31  */
32 extern const char vdso32_int80_start, vdso32_int80_end;
33 extern const char vdso32_syscall_start, vdso32_syscall_end;
34 extern const char vdso32_sysenter_start, vdso32_sysenter_end;
35
36 void __init patch_vdso32(void *vdso, size_t len);
37
38 #endif /* _ASM_X86_VDSO_H */