mirror of
https://github.com/torvalds/linux.git
synced 2024-12-20 01:52:13 +00:00
05ef76b20f
The old scheme for mapping the vDSO text is rather complicated. vdso2c generates a struct vm_special_mapping and a blank .pages array of the correct size for each vdso image. Init code in vdso/vma.c populates the .pages array for each vDSO image, and the mapping code selects the appropriate struct vm_special_mapping. With .fault, we can use a less roundabout approach: vdso_fault() just returns the appropriate page for the selected vDSO image. Signed-off-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/f886954c186bafd74e1b967c8931d852ae199aa2.1451446564.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
47 lines
970 B
C
47 lines
970 B
C
#ifndef _ASM_X86_VDSO_H
|
|
#define _ASM_X86_VDSO_H
|
|
|
|
#include <asm/page_types.h>
|
|
#include <linux/linkage.h>
|
|
#include <linux/init.h>
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
#include <linux/mm_types.h>
|
|
|
|
struct vdso_image {
|
|
void *data;
|
|
unsigned long size; /* Always a multiple of PAGE_SIZE */
|
|
|
|
unsigned long alt, alt_len;
|
|
|
|
long sym_vvar_start; /* Negative offset to the vvar area */
|
|
|
|
long sym_vvar_page;
|
|
long sym_hpet_page;
|
|
long sym_pvclock_page;
|
|
long sym_VDSO32_NOTE_MASK;
|
|
long sym___kernel_sigreturn;
|
|
long sym___kernel_rt_sigreturn;
|
|
long sym___kernel_vsyscall;
|
|
long sym_int80_landing_pad;
|
|
};
|
|
|
|
#ifdef CONFIG_X86_64
|
|
extern const struct vdso_image vdso_image_64;
|
|
#endif
|
|
|
|
#ifdef CONFIG_X86_X32
|
|
extern const struct vdso_image vdso_image_x32;
|
|
#endif
|
|
|
|
#if defined CONFIG_X86_32 || defined CONFIG_COMPAT
|
|
extern const struct vdso_image vdso_image_32;
|
|
#endif
|
|
|
|
extern void __init init_vdso_image(const struct vdso_image *image);
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* _ASM_X86_VDSO_H */
|