if (security_vm_enough_memory(vdso_pages)) { kmem_cache_free(vm_area_cachep, vma); return -ENOMEM; } 
int arch_setup_additional_pages(struct linux_binprm *bprm, int executable_stack){	struct mm_struct *mm = current->mm;	struct vm_area_struct *vma;	unsigned long vdso_pages;	unsigned long vdso_base;	if (test_thread_flag(TIF_32BIT)) {		vdso_pages = vdso32_pages;		vdso_base = VDSO32_MBASE;	} else {		vdso_pages = vdso64_pages;		vdso_base = VDSO64_MBASE;	}	current->thread.vdso_base = 0;	/* vDSO has a problem and was disabled, just don't "enable" it for the	 * process	 */	if (vdso_pages == 0)		return 0;	vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);	if (vma == NULL)		return -ENOMEM;	if (security_vm_enough_memory(vdso_pages)) {		kmem_cache_free(vm_area_cachep, vma);		return -ENOMEM;	}	memset(vma, 0, sizeof(*vma));	/*	 * pick a base address for the vDSO in process space. We try to put it	 * at vdso_base which is the "natural" base for it, but we might fail	 * and end up putting it elsewhere.	 */	vdso_base = get_unmapped_area(NULL, vdso_base,				      vdso_pages << PAGE_SHIFT, 0, 0);	if (vdso_base & ~PAGE_MASK)		return (int)vdso_base;	current->thread.vdso_base = vdso_base;	vma->vm_mm = mm;	vma->vm_start = current->thread.vdso_base;	/*	 * the VMA size is one page more than the vDSO since systemcfg	 * is mapped in the last one	 */	vma->vm_end = vma->vm_start + ((vdso_pages + 1) << PAGE_SHIFT);	/*	 * our vma flags don't have VM_WRITE so by default, the process isn't allowed	 * to write those pages.	 * gdb can break that with ptrace interface, and thus trigger COW on those	 * pages but it's then your responsibility to never do that on the "data" page	 * of the vDSO or you'll stop getting kernel updates and your nice userland	 * gettimeofday will be totally dead. It's fine to use that for setting	 * breakpoints in the vDSO code pages though	 */	vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;	vma->vm_flags |= mm->def_flags;	vma->vm_page_prot = protection_map[vma->vm_flags & 0x7];	vma->vm_ops = &vdso_vmops;	down_write(&mm->mmap_sem);	insert_vm_struct(mm, vma);	mm->total_vm += (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;	up_write(&mm->mmap_sem);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2fd4ef85e0db9ed75c98e13953257a967ea55e03/vdso.c/clean/arch/ppc64/kernel/vdso.c