public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: + fully-honor-vdso_enabled.patch added to -mm tree
@ 2007-03-01 17:52 Oleg Nesterov
  2007-03-02  3:48 ` Paul Mundt
  2007-03-02 21:06 ` John Reiser
  0 siblings, 2 replies; 13+ messages in thread
From: Oleg Nesterov @ 2007-03-01 17:52 UTC (permalink / raw)
  To: John Reiser
  Cc: Andi Kleen, Ingo Molnar, Arjan van de Ven, Paul Mundt,
	Andrew Morton, linux-kernel

John Reiser wrote:
>
> --- a/arch/i386/kernel/sysenter.c~fully-honor-vdso_enabled
> +++ a/arch/i386/kernel/sysenter.c
> @@ -22,6 +22,8 @@
>  #include <asm/msr.h>
>  #include <asm/pgtable.h>
>  #include <asm/unistd.h>
> +#include <asm/a.out.h>
> +#include <asm/mman.h>
>
>  /*
>   * Should the kernel map a VDSO page into processes and pass its
> @@ -105,10 +107,25 @@ int arch_setup_additional_pages(struct l
>  {
>  	struct mm_struct *mm = current->mm;
>  	unsigned long addr;
> +	unsigned long flags;
>  	int ret;
>
> +	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.

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.

Could you please explain if I missed something?

Oleg.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-03-05 10:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 17:52 + fully-honor-vdso_enabled.patch added to -mm tree Oleg Nesterov
2007-03-02  3:48 ` Paul Mundt
2007-03-02 19:32   ` Oleg Nesterov
2007-03-02 21:19     ` John Reiser
2007-03-03 17:38       ` Oleg Nesterov
2007-03-02 21:06 ` John Reiser
2007-03-02 22:18   ` Oleg Nesterov
2007-03-05 10:12     ` Paul Mundt
2007-03-05 10:54       ` Oleg Nesterov
2007-03-05 10:56         ` Paul Mundt
2007-03-02 22:19   ` Chuck Ebbert
2007-03-02 23:11     ` Oleg Nesterov
2007-03-02 23:33     ` John Reiser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox