]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/vdso/vdso32-setup.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / x86 / vdso / vdso32-setup.c
index 348f1341e1c8f4693c5615f9045c49244cc555bf..cf058fecfceec989354ec17a3d681cae65315935 100644 (file)
@@ -162,7 +162,7 @@ static __init void relocate_vdso(Elf32_Ehdr *ehdr)
        Elf32_Shdr *shdr;
        int i;
 
-       BUG_ON(memcmp(ehdr->e_ident, ELFMAG, 4) != 0 ||
+       BUG_ON(memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0 ||
               !elf_check_arch_ia32(ehdr) ||
               ehdr->e_type != ET_DYN);
 
@@ -210,8 +210,12 @@ static int use_sysenter __read_mostly = -1;
 /* May not be __init: called during resume */
 void syscall32_cpu_init(void)
 {
-       if (use_sysenter < 0)
-               use_sysenter = (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL);
+       if (use_sysenter < 0) {
+               if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
+                       use_sysenter = 1;
+               if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR)
+                       use_sysenter = 1;
+       }
 
        /* Load these always in case some future AMD CPU supports
           SYSENTER from compat mode too. */
@@ -299,8 +303,6 @@ int __init sysenter_setup(void)
 
 #ifdef CONFIG_X86_32
        gate_vma_init();
-
-       printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
 #endif
 
        if (!vdso32_sysenter()) {
@@ -325,6 +327,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
        int ret = 0;
        bool compat;
 
+       if (vdso_enabled == VDSO_DISABLED)
+               return 0;
+
        down_write(&mm->mmap_sem);
 
        /* Test compat mode once here, in case someone