Re: + fully-honor-vdso_enabled.patch added to -mm tree

From: Paul Mundt
Date: Mon Mar 05 2007 - 05:59:25 EST


On Mon, Mar 05, 2007 at 01:54:44PM +0300, Oleg Nesterov wrote:
> On 03/05, Paul Mundt wrote:
> > - if (current->binfmt->hasvdso)
> > + if (current->binfmt->hasvdso && current->mm->context.vdso)
>
> I think this is correct, but a bit strange.
>
> The "->context.vdso != NULL" check relies on the fact that .vdso == NULL
> after mm_alloc (because arch_setup_additional_pages() doesn' initialize
> it when vdso_enabled == 0, and it has to be != NULL otherwise).
>
> This means that binfmt->hasvdso in essence is not used, at least for i386.
> Isn't it better to kill ->hasvdso and just use ->context.vdso ? Every usage
> of ->hasvdso should also check ->context.vdso anyway.
>
That was my thought as well, it looks like it's only needed for x86_64. We
don't look at binfmt->hasvdso on SH at all at least, and it works fine
there.. I left it in in the patch since I figured x86 had a reason for
checking it, but perhaps someone who knows the x86/x86_64 interaction
can comment on this.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/