Re: + fully-honor-vdso_enabled.patch added to -mm tree
From: Oleg Nesterov
Date: Mon Mar 05 2007 - 05:55:42 EST
On 03/05, Paul Mundt wrote:
>
> On Sat, Mar 03, 2007 at 01:18:54AM +0300, Oleg Nesterov wrote:
> > On 03/02, John Reiser wrote:
> > > Paul Mundt has commented on setup_rt_frame() and provided a patch which
> > > bullet-proofs that area. I will include that patch into the next revision.
> >
> > Confused. I still think his patch incomplete. Don't we need the same check
> > in setup_rt_frame() ?
> >
> Yes, you're right. The patch is missing the proper restorer logic in the
> setup_rt_frame() case. This should handle both of them, restoring the
> previous logic when the VDSO is disabled.
>
> Signed-off-by: Paul Mundt <lethal@xxxxxxxxxxxx>
>
> --
>
> arch/i386/kernel/signal.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
> index 4f99e87..26c2497 100644
> --- a/arch/i386/kernel/signal.c
> +++ b/arch/i386/kernel/signal.c
> @@ -350,7 +350,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
> goto give_sigsegv;
> }
>
> - 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.
Oleg.
-
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/