vdso.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | vdso.c (d8ed45c5dcd455fc5848d47f86883a1b872ac0d0) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * vDSO implementation for Hexagon 4 * 5 * Copyright (c) 2011, The Linux Foundation. All rights reserved. 6 */ 7 8#include <linux/err.h> --- 38 unchanged lines hidden (view full) --- 47 * Called from binfmt_elf. Create a VMA for the vDSO page. 48 */ 49int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) 50{ 51 int ret; 52 unsigned long vdso_base; 53 struct mm_struct *mm = current->mm; 54 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * vDSO implementation for Hexagon 4 * 5 * Copyright (c) 2011, The Linux Foundation. All rights reserved. 6 */ 7 8#include <linux/err.h> --- 38 unchanged lines hidden (view full) --- 47 * Called from binfmt_elf. Create a VMA for the vDSO page. 48 */ 49int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) 50{ 51 int ret; 52 unsigned long vdso_base; 53 struct mm_struct *mm = current->mm; 54 |
55 if (down_write_killable(&mm->mmap_sem)) | 55 if (mmap_write_lock_killable(mm)) |
56 return -EINTR; 57 58 /* Try to get it loaded right near ld.so/glibc. */ 59 vdso_base = STACK_TOP; 60 61 vdso_base = get_unmapped_area(NULL, vdso_base, PAGE_SIZE, 0, 0); 62 if (IS_ERR_VALUE(vdso_base)) { 63 ret = vdso_base; --- 7 unchanged lines hidden (view full) --- 71 &vdso_page); 72 73 if (ret) 74 goto up_fail; 75 76 mm->context.vdso = (void *)vdso_base; 77 78up_fail: | 56 return -EINTR; 57 58 /* Try to get it loaded right near ld.so/glibc. */ 59 vdso_base = STACK_TOP; 60 61 vdso_base = get_unmapped_area(NULL, vdso_base, PAGE_SIZE, 0, 0); 62 if (IS_ERR_VALUE(vdso_base)) { 63 ret = vdso_base; --- 7 unchanged lines hidden (view full) --- 71 &vdso_page); 72 73 if (ret) 74 goto up_fail; 75 76 mm->context.vdso = (void *)vdso_base; 77 78up_fail: |
79 up_write(&mm->mmap_sem); | 79 mmap_write_unlock(mm); |
80 return ret; 81} 82 83const char *arch_vma_name(struct vm_area_struct *vma) 84{ 85 if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) 86 return "[vdso]"; 87 return NULL; 88} | 80 return ret; 81} 82 83const char *arch_vma_name(struct vm_area_struct *vma) 84{ 85 if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) 86 return "[vdso]"; 87 return NULL; 88} |