b67e612cef
This replaces a decent amount of incomprehensible and buggy code with much more straightforward code. It also brings the 32-bit vdso more in line with the 64-bit vdsos, so maybe someday they can share even more code. This wastes a small amount of kernel .data and .text space, but it avoids a couple of allocations on startup, so it should be more or less a wash memory-wise. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Stefani Seibold <stefani@seibold.net> Link: http://lkml.kernel.org/r/b8093933fad09ce181edb08a61dcd5d2592e9814.1395352498.git.luto@amacapital.net Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
31 lines
740 B
C
31 lines
740 B
C
#ifndef _ASM_X86_VDSO_H
|
|
#define _ASM_X86_VDSO_H
|
|
|
|
#if defined CONFIG_X86_32 || defined CONFIG_COMPAT
|
|
|
|
#include <asm/vdso32.h>
|
|
|
|
extern const char VDSO32_PRELINK[];
|
|
|
|
/*
|
|
* Given a pointer to the vDSO image, find the pointer to VDSO32_name
|
|
* as that symbol is defined in the vDSO sources or linker script.
|
|
*/
|
|
#define VDSO32_SYMBOL(base, name) \
|
|
({ \
|
|
extern const char VDSO32_##name[]; \
|
|
(void __user *)(VDSO32_##name + (unsigned long)(base)); \
|
|
})
|
|
#endif
|
|
|
|
/*
|
|
* These symbols are defined with the addresses in the vsyscall page.
|
|
* See vsyscall-sigreturn.S.
|
|
*/
|
|
extern void __user __kernel_sigreturn;
|
|
extern void __user __kernel_rt_sigreturn;
|
|
|
|
void __init patch_vdso32(void *vdso, size_t len);
|
|
|
|
#endif /* _ASM_X86_VDSO_H */
|