Subject: Re: [PATCH] powerpc vdso updates

From: Ingo Molnar <[email-masked]>
Date: Tue, 30 May 2006 08:24:47 +0200

* Benjamin Herrenschmidt <[email-masked]> wrote:

> This patch cleans up some locking & error handling in the ppc vdso and 
> moves the vdso base pointer from the thread struct to the mm context 
> where it more logically belongs. It brings the powerpc implementation 
> closer to Ingo's new x86 one and also adds an arch_vma_name() function 
> allowing to print [vsdo] in /proc/<pid>/maps if Ingo's x86 vdso patch 
> is also applied.

looks good to me.

> Signed-off-by: Benjamin Herrenschmidt <[email-masked]>

Reviewed-by: Ingo Molnar <[email-masked]>

> This is 2.6.18 material, hopefully should go along with Ingo's x86 
> vdso updates. Ingo, if you change something to arch_vma_name(), please 
> let me know.

ok. There's one bit that could potentially be 2.6.17 material:

>  	 * at vdso_base which is the "natural" base for it, but we might fail
>  	 * and end up putting it elsewhere.
>  	 */
> +	down_write(&mm->mmap_sem);
>  	vdso_base = get_unmapped_area(NULL, vdso_base,
>  				      vdso_pages << PAGE_SHIFT, 0, 0);

get_unmapped_area() without holding the mmap semaphore seems dangerous. 
The VDSO setup itself should be 'private' to the process, but i'm not 
totally sure that no other kernel code could get access to this mm. For 
example the swapout code? Am i missing something?

	Ingo