[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070302221854.GA162@tv-sign.ru>
Date: Sat, 3 Mar 2007 01:18:54 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: John Reiser <jreiser@...Wagon.com>
Cc: Andi Kleen <ak@...e.de>, Ingo Molnar <mingo@...e.hu>,
Arjan van de Ven <arjan@...radead.org>,
Paul Mundt <lethal@...ux-sh.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: + fully-honor-vdso_enabled.patch added to -mm tree
On 03/02, John Reiser wrote:
>
> Oleg Nesterov wrote:
> > John Reiser wrote:
>
> >>+ switch (vdso_enabled) {
> >>+ case 0: /* none */
> >>+ return 0;
> >
> >
> > This means we don't initialize mm->context.vdso and ->sysenter_return.
> >
> > Is it ok? For example, setup_rt_frame() uses VDSO_SYM(&__kernel_rt_sigreturn),
> > sysenter_past_esp pushes ->sysenter_return on stack.
>
> 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() ?
> The value of ->sysenter_return is interpreted in user space by the
> sysexit instruction; nobody else cares what the value is. The kernel
> is not required to provide a good value when vdso_enabled is zero,
Yes sure.
> Both context.vdso and sysenter_return could be set to zero whenever
> vdso_enabled is zero; those two values might even be defaulted.
> I'll add such a change to the next revision of the patch, if you'll
> defend it against claims of "unnecessary code."
context.vdso == NULL after mm_alloc(). I don't see a "good" arch dependent
function to clear ->sysenter_return (if we really need this). May be
flush_thread().
> > Note also that load_elf_binary does
> >
> > arch_setup_additional_pages()
> > create_elf_tables()
> >
> > , looks like application can crash after exec if vdso_enabled changes from 0
> > to 1 in between.
>
> Correct. Changing vdso_enabled from 0 to non-zero must be prepared
> to lose this race if it is not prevented. Ordinarily it won't matter
> because the administrator will perform such changes at a "quiet" time.
I agree, this problem is mostly theoretical, but I believe it is hardly
possible to document what the "quiet" time is ;)
How about
#define ARCH_DLINFO
-do if (vdso_enabled) {
+do if (VDSO_BASE) {
?
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists