Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104347
b: refs/heads/master
c: 369c992
h: refs/heads/master
i:
  104345: f61093f
  104343: 0a8aaff
v: v3
  • Loading branch information
Jan Beulich authored and H. Peter Anvin committed Jul 18, 2008
1 parent 2ff70fa commit 23d4281
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 812b121d55316333a3480b294523d4e52f9dd366
refs/heads/master: 369c99205f633d1e4038b15f5dc4a5500a4359c3
11 changes: 6 additions & 5 deletions trunk/arch/x86/vdso/vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ unsigned int __read_mostly vdso_enabled = 1;
extern char vdso_start[], vdso_end[];
extern unsigned short vdso_sync_cpuid;

struct page **vdso_pages;
static struct page **vdso_pages;
static unsigned vdso_size;

static inline void *var_ref(void *p, char *name)
{
Expand All @@ -38,6 +39,7 @@ static int __init init_vdso_vars(void)
int i;
char *vbase;

vdso_size = npages << PAGE_SHIFT;
vdso_pages = kmalloc(sizeof(struct page *) * npages, GFP_KERNEL);
if (!vdso_pages)
goto oom;
Expand Down Expand Up @@ -101,20 +103,19 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
struct mm_struct *mm = current->mm;
unsigned long addr;
int ret;
unsigned len = round_up(vdso_end - vdso_start, PAGE_SIZE);

if (!vdso_enabled)
return 0;

down_write(&mm->mmap_sem);
addr = vdso_addr(mm->start_stack, len);
addr = get_unmapped_area(NULL, addr, len, 0, 0);
addr = vdso_addr(mm->start_stack, vdso_size);
addr = get_unmapped_area(NULL, addr, vdso_size, 0, 0);
if (IS_ERR_VALUE(addr)) {
ret = addr;
goto up_fail;
}

ret = install_special_mapping(mm, addr, len,
ret = install_special_mapping(mm, addr, vdso_size,
VM_READ|VM_EXEC|
VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
VM_ALWAYSDUMP,
Expand Down

0 comments on commit 23d4281

Please sign in to comment.