diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 06461b8b715d532ef93c0d57e6f9efe3375815c1..5e47683fc63ae736e25d30e83aef093965cdc17d 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -302,12 +302,16 @@ sysenter_past_esp: pushl $(__USER_CS) CFI_ADJUST_CFA_OFFSET 4 /*CFI_REL_OFFSET cs, 0*/ +#ifndef CONFIG_COMPAT_VDSO /* * Push current_thread_info()->sysenter_return to the stack. * A tiny bit of offset fixup is necessary - 4*4 means the 4 words * pushed above; +8 corresponds to copy_thread's esp0 setting. */ pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp) +#else + pushl $SYSENTER_RETURN +#endif CFI_ADJUST_CFA_OFFSET 4 CFI_REL_OFFSET eip, 0 diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c index 7de9117b5a3ada15bf9e401afc9695e849bac8af..454d12df59ea758193c38cfd8cd35fa72283d13c 100644 --- a/arch/i386/kernel/sysenter.c +++ b/arch/i386/kernel/sysenter.c @@ -100,6 +100,7 @@ int __init sysenter_setup(void) return 0; } +#ifndef CONFIG_COMPAT_VDSO static struct page *syscall_nopage(struct vm_area_struct *vma, unsigned long adr, int *type) { @@ -187,3 +188,4 @@ int in_gate_area_no_task(unsigned long addr) { return 0; } +#endif diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 45d21a0c95bf8127368f7fe273facaabf2f6a9ee..0515d61d54111d4c094ea296a926bf966e043fee 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h @@ -143,11 +143,8 @@ extern int dump_task_extended_fpu (struct task_struct *, struct user_fxsr_struct # define VDSO_PRELINK 0 #endif -#define VDSO_COMPAT_SYM(x) \ - (VDSO_COMPAT_BASE + (unsigned long)(x) - VDSO_PRELINK) - #define VDSO_SYM(x) \ - (VDSO_BASE + (unsigned long)(x) - VDSO_PRELINK) + (VDSO_COMPAT_BASE + (unsigned long)(x) - VDSO_PRELINK) #define VDSO_HIGH_EHDR ((const struct elfhdr *) VDSO_HIGH_BASE) #define VDSO_EHDR ((const struct elfhdr *) VDSO_COMPAT_BASE) @@ -156,10 +153,12 @@ extern void __kernel_vsyscall; #define VDSO_ENTRY VDSO_SYM(&__kernel_vsyscall) +#ifndef CONFIG_COMPAT_VDSO #define ARCH_HAS_SETUP_ADDITIONAL_PAGES struct linux_binprm; extern int arch_setup_additional_pages(struct linux_binprm *bprm, int executable_stack); +#endif extern unsigned int vdso_enabled; diff --git a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h index 02428cb366219072fe81d3210279708f52fb5854..3e9f610c35df97d64d151189f1ab104629d16220 100644 --- a/include/asm-i386/fixmap.h +++ b/include/asm-i386/fixmap.h @@ -23,6 +23,8 @@ extern unsigned long __FIXADDR_TOP; #else #define __FIXADDR_TOP 0xfffff000 +#define FIXADDR_USER_START __fix_to_virt(FIX_VDSO) +#define FIXADDR_USER_END __fix_to_virt(FIX_VDSO - 1) #endif #ifndef __ASSEMBLY__ diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index fd3f64ace24872f1e0843049434c95fff4cf2516..7b19f454761de838acb513e2f14f00215581d31a 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h @@ -143,7 +143,9 @@ extern int page_is_ram(unsigned long pagenr); #include #include +#ifndef CONFIG_COMPAT_VDSO #define __HAVE_ARCH_GATE_AREA 1 +#endif #endif /* __KERNEL__ */ #endif /* _I386_PAGE_H */