Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167864
b: refs/heads/master
c: 348aa30
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Schwab authored and Benjamin Herrenschmidt committed Oct 27, 2009
1 parent e440dd2 commit cea8859
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 7de80284d60837f13ecb2347ba7bf57470309541
refs/heads/master: 348aa3030096e61474a5537fed5bd69e70b755c0
11 changes: 10 additions & 1 deletion trunk/arch/powerpc/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
/* Max supported size for symbol names */
#define MAX_SYMNAME 64

/* The alignment of the vDSO */
#define VDSO_ALIGNMENT (1 << 16)

extern char vdso32_start, vdso32_end;
static void *vdso32_kbase = &vdso32_start;
static unsigned int vdso32_pages;
Expand Down Expand Up @@ -231,15 +234,21 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
* 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.
* Add enough to the size so that the result can be aligned.
*/
down_write(&mm->mmap_sem);
vdso_base = get_unmapped_area(NULL, vdso_base,
vdso_pages << PAGE_SHIFT, 0, 0);
(vdso_pages << PAGE_SHIFT) +
((VDSO_ALIGNMENT - 1) & PAGE_MASK),
0, 0);
if (IS_ERR_VALUE(vdso_base)) {
rc = vdso_base;
goto fail_mmapsem;
}

/* Add required alignment. */
vdso_base = ALIGN(vdso_base, VDSO_ALIGNMENT);

/*
* Put vDSO base into mm struct. We need to do this before calling
* install_special_mapping or the perf counter mmap tracking code
Expand Down

0 comments on commit cea8859

Please sign in to comment.