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

2007-03-05 Thread Paul Mundt
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

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

2007-03-05 Thread Oleg Nesterov
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. > >

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

2007-03-05 Thread Paul Mundt
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

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

2007-03-05 Thread Paul Mundt
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.

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

2007-03-05 Thread Oleg Nesterov
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

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

2007-03-05 Thread Paul Mundt
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

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

2007-03-03 Thread Oleg Nesterov
On 03/02, John Reiser wrote: > > Oleg Nesterov wrote: > > > Still, I don't understand why we don't pass NEW_AUX_ENT(AT_SYSINFO) when > > vdso_enabled == 0. We don't need linux-gate.so to use __kernel_vsyscall, > > we have FIX_VDSO. In that case we should s/PAGE_KERNEL_RO/PAGE_READONLY/ > > of

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

2007-03-03 Thread Oleg Nesterov
On 03/02, John Reiser wrote: Oleg Nesterov wrote: Still, I don't understand why we don't pass NEW_AUX_ENT(AT_SYSINFO) when vdso_enabled == 0. We don't need linux-gate.so to use __kernel_vsyscall, we have FIX_VDSO. In that case we should s/PAGE_KERNEL_RO/PAGE_READONLY/ of course. I

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

2007-03-02 Thread John Reiser
Chuck Ebbert wrote: > John Reiser wrote: > >>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, >>because the kernel has not told the

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

2007-03-02 Thread Oleg Nesterov
On 03/02, Chuck Ebbert wrote: > > John Reiser wrote: > > 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, > > because the kernel has

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

2007-03-02 Thread Chuck Ebbert
John Reiser wrote: > 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, > because the kernel has not told the process that sysenter is valid

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

2007-03-02 Thread Oleg Nesterov
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,

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

2007-03-02 Thread John Reiser
Oleg Nesterov wrote: > Still, I don't understand why we don't pass NEW_AUX_ENT(AT_SYSINFO) when > vdso_enabled == 0. We don't need linux-gate.so to use __kernel_vsyscall, > we have FIX_VDSO. In that case we should s/PAGE_KERNEL_RO/PAGE_READONLY/ > of course. I guess the reason is some magic in

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

2007-03-02 Thread John Reiser
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), >

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

2007-03-02 Thread Oleg Nesterov
On 03/02, Paul Mundt wrote: > > On Thu, Mar 01, 2007 at 08:52:07PM +0300, Oleg Nesterov wrote: > > > > > > @@ -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; >

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

2007-03-02 Thread Oleg Nesterov
On 03/02, Paul Mundt wrote: On Thu, Mar 01, 2007 at 08:52:07PM +0300, Oleg Nesterov wrote: @@ -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

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

2007-03-02 Thread John Reiser
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

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

2007-03-02 Thread John Reiser
Oleg Nesterov wrote: Still, I don't understand why we don't pass NEW_AUX_ENT(AT_SYSINFO) when vdso_enabled == 0. We don't need linux-gate.so to use __kernel_vsyscall, we have FIX_VDSO. In that case we should s/PAGE_KERNEL_RO/PAGE_READONLY/ of course. I guess the reason is some magic in glibc.

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

2007-03-02 Thread Oleg Nesterov
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

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

2007-03-02 Thread Chuck Ebbert
John Reiser wrote: 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, because the kernel has not told the process that sysenter is valid (by

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

2007-03-02 Thread Oleg Nesterov
On 03/02, Chuck Ebbert wrote: John Reiser wrote: 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, because the kernel has not told the

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

2007-03-02 Thread John Reiser
Chuck Ebbert wrote: John Reiser wrote: 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, because the kernel has not told the process that

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

2007-03-01 Thread Paul Mundt
On Thu, Mar 01, 2007 at 08:52:07PM +0300, Oleg Nesterov wrote: > > --- a/arch/i386/kernel/sysenter.c~fully-honor-vdso_enabled > > +++ a/arch/i386/kernel/sysenter.c > > @@ -22,6 +22,8 @@ > > #include > > #include > > #include > > +#include > > +#include > > > > /* > > * Should the kernel

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

2007-03-01 Thread Oleg Nesterov
John Reiser wrote: > > --- a/arch/i386/kernel/sysenter.c~fully-honor-vdso_enabled > +++ a/arch/i386/kernel/sysenter.c > @@ -22,6 +22,8 @@ > #include > #include > #include > +#include > +#include > > /* > * Should the kernel map a VDSO page into processes and pass its > @@ -105,10

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

2007-03-01 Thread Oleg Nesterov
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

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

2007-03-01 Thread Paul Mundt
On Thu, Mar 01, 2007 at 08:52:07PM +0300, Oleg Nesterov 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