vma.c (c09c9dd2e9c732658c744a802101d5c34fedde22) | vma.c (dac16fba6fc590fa7239676b35ed75dae4c4cd2b) |
---|---|
1/* 2 * Copyright 2007 Andi Kleen, SUSE Labs. 3 * Subject to the GPL, v.2 4 * 5 * This contains most of the x86 vDSO kernel-side code. 6 */ 7#include <linux/mm.h> 8#include <linux/err.h> --- 86 unchanged lines hidden (view full) --- 95 struct vm_area_struct *vma; 96 unsigned long addr, text_start; 97 int ret = 0; 98 static struct page *no_pages[] = {NULL}; 99 static struct vm_special_mapping vvar_mapping = { 100 .name = "[vvar]", 101 .pages = no_pages, 102 }; | 1/* 2 * Copyright 2007 Andi Kleen, SUSE Labs. 3 * Subject to the GPL, v.2 4 * 5 * This contains most of the x86 vDSO kernel-side code. 6 */ 7#include <linux/mm.h> 8#include <linux/err.h> --- 86 unchanged lines hidden (view full) --- 95 struct vm_area_struct *vma; 96 unsigned long addr, text_start; 97 int ret = 0; 98 static struct page *no_pages[] = {NULL}; 99 static struct vm_special_mapping vvar_mapping = { 100 .name = "[vvar]", 101 .pages = no_pages, 102 }; |
103 struct pvclock_vsyscall_time_info *pvti; |
|
103 104 if (calculate_addr) { 105 addr = vdso_addr(current->mm->start_stack, 106 image->size - image->sym_vvar_start); 107 } else { 108 addr = 0; 109 } 110 --- 53 unchanged lines hidden (view full) --- 164 PAGE_SIZE, 165 pgprot_noncached(PAGE_READONLY)); 166 167 if (ret) 168 goto up_fail; 169 } 170#endif 171 | 104 105 if (calculate_addr) { 106 addr = vdso_addr(current->mm->start_stack, 107 image->size - image->sym_vvar_start); 108 } else { 109 addr = 0; 110 } 111 --- 53 unchanged lines hidden (view full) --- 165 PAGE_SIZE, 166 pgprot_noncached(PAGE_READONLY)); 167 168 if (ret) 169 goto up_fail; 170 } 171#endif 172 |
173 pvti = pvclock_pvti_cpu0_va(); 174 if (pvti && image->sym_pvclock_page) { 175 ret = remap_pfn_range(vma, 176 text_start + image->sym_pvclock_page, 177 __pa(pvti) >> PAGE_SHIFT, 178 PAGE_SIZE, 179 PAGE_READONLY); 180 181 if (ret) 182 goto up_fail; 183 } 184 |
|
172up_fail: 173 if (ret) 174 current->mm->context.vdso = NULL; 175 176 up_write(&mm->mmap_sem); 177 return ret; 178} 179 --- 113 unchanged lines hidden --- | 185up_fail: 186 if (ret) 187 current->mm->context.vdso = NULL; 188 189 up_write(&mm->mmap_sem); 190 return ret; 191} 192 --- 113 unchanged lines hidden --- |