diff -urp --new-file ../git/t/arch/x86_64/ia32/ia32_binfmt.c linux-2.6.15/arch/x86_64/ia32/ia32_binfmt.c --- ../git/t/arch/x86_64/ia32/ia32_binfmt.c 2006-02-01 13:51:42.000000000 +0300 +++ linux-2.6.15/arch/x86_64/ia32/ia32_binfmt.c 2006-02-01 12:56:12.000000000 +0300 @@ -34,7 +34,7 @@ #define AT_SYSINFO 32 #define AT_SYSINFO_EHDR 33 -int sysctl_vsyscall32 = 1; +int sysctl_vsyscall32 = 0; #define ARCH_DLINFO do { \ if (sysctl_vsyscall32) { \ diff -urp --new-file ../git/t/arch/x86_64/ia32/syscall32.c linux-2.6.15/arch/x86_64/ia32/syscall32.c --- ../git/t/arch/x86_64/ia32/syscall32.c 2006-02-01 13:51:42.000000000 +0300 +++ linux-2.6.15/arch/x86_64/ia32/syscall32.c 2006-02-01 12:56:12.000000000 +0300 @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,10 @@ int syscall32_setup_pages(struct linux_b flags, NULL, UB_SOFT)) goto err_charge; + if (sysctl_at_vsyscall == 0) + return 0; + + printk(KERN_WARNING "WARN! vsyscalls are broken on x86-64"); vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); if (!vma) goto err_alloc; diff -urp --new-file ../git/t/fs/exec.c linux-2.6.15/fs/exec.c --- ../git/t/fs/exec.c 2006-02-01 13:51:59.000000000 +0300 +++ linux-2.6.15/fs/exec.c 2006-02-01 12:56:12.000000000 +0300 @@ -66,6 +66,8 @@ int suid_dumpable = 0; EXPORT_SYMBOL(suid_dumpable); /* The maximal length of core_pattern is also specified in sysctl.c */ +int sysctl_at_vsyscall; + static struct linux_binfmt *formats; static DEFINE_RWLOCK(binfmt_lock); diff -urp --new-file ../git/t/include/asm-i386/elf.h linux-2.6.15/include/asm-i386/elf.h --- ../git/t/include/asm-i386/elf.h 2006-02-01 13:52:03.000000000 +0300 +++ linux-2.6.15/include/asm-i386/elf.h 2006-02-01 12:56:12.000000000 +0300 @@ -136,8 +136,10 @@ extern void __kernel_vsyscall; #define ARCH_DLINFO \ do { \ + if (sysctl_at_vsyscall) { \ NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \ NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \ + } \ } while (0) /* diff -urp --new-file ../git/t/include/linux/elfcore.h linux-2.6.15/include/linux/elfcore.h --- ../git/t/include/linux/elfcore.h 2006-02-01 13:52:08.000000000 +0300 +++ linux-2.6.15/include/linux/elfcore.h 2006-02-01 12:56:12.000000000 +0300 @@ -6,6 +6,8 @@ #include #include +extern int sysctl_at_vsyscall; + struct elf_siginfo { int si_signo; /* signal number */ diff -urp --new-file ../git/t/include/linux/sysctl.h linux-2.6.15/include/linux/sysctl.h --- ../git/t/include/linux/sysctl.h 2006-02-01 13:52:08.000000000 +0300 +++ linux-2.6.15/include/linux/sysctl.h 2006-02-01 12:56:12.000000000 +0300 @@ -755,6 +755,7 @@ enum FS_AIO_NR=18, /* current system-wide number of aio requests */ FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ FS_INOTIFY=20, /* inotify submenu */ + FS_AT_VSYSCALL=21, /* int: to announce vsyscall data */ }; /* /proc/sys/fs/quota/ */ diff -urp --new-file ../git/t/kernel/sysctl.c linux-2.6.15/kernel/sysctl.c --- ../git/t/kernel/sysctl.c 2006-02-01 13:52:09.000000000 +0300 +++ linux-2.6.15/kernel/sysctl.c 2006-02-01 12:56:12.000000000 +0300 @@ -62,6 +62,7 @@ extern int max_threads; extern int sysrq_enabled; extern int core_uses_pid; extern int suid_dumpable; +extern int sysctl_at_vsyscall; extern char core_pattern[]; extern int cad_pid; extern int pid_max; @@ -995,6 +996,14 @@ static ctl_table fs_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, + { + .ctl_name = FS_AT_VSYSCALL, + .procname = "vsyscall", + .data = &sysctl_at_vsyscall, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, { .ctl_name = 0 } };