Re: [parisc-linux] Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Grant Grundler
On Wed, Jun 06, 2007 at 11:12:09AM +0200, Peter Zijlstra wrote: ... > > I think the same problem will happen on NOMMU && STACK_GROWS_UP. There are > > several new references to bprm->vma in there, not all inside CONFIG_MMU. > > Right, which archs have that combo? I'll go gather cross compilers.

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Andi Kleen
> could do I guess, but doesn't this modern gcc thing auto inline statics > that are so small? Yes it does. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 18:44 +0900, Paul Mundt wrote: > On Wed, Jun 06, 2007 at 11:34:33AM +0200, Peter Zijlstra wrote: > > +static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos, > > + struct page *page) > > +{ > > + flush_cache_page(bprm->vma, pos,

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Paul Mundt
On Wed, Jun 06, 2007 at 11:34:33AM +0200, Peter Zijlstra wrote: > +static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos, > + struct page *page) > +{ > + flush_cache_page(bprm->vma, pos, page_to_pfn(page)); > +} > + [snip] > @@ -253,6 +305,17 @@ static void

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 02:06 -0700, Andrew Morton wrote: > I think the same problem will happen on NOMMU && STACK_GROWS_UP. There are > several new references to bprm->vma in there, not all inside CONFIG_MMU. I found two: one in setup_arg_pages() and one in get_arg_page() both are under

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 02:06 -0700, Andrew Morton wrote: > On Wed, 06 Jun 2007 10:54:21 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > > > It is a bit peculiar in that we have one task with two mm's, one of > > > > which is > > > > inactive. > > > > > > > > ... > > > > > > > > +

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Andrew Morton
On Wed, 06 Jun 2007 10:54:21 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > It is a bit peculiar in that we have one task with two mm's, one of which > > > is > > > inactive. > > > > > > ... > > > > > > + flush_cache_page(bprm->vma, kpos, > > > +

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 01:36 -0700, Andrew Morton wrote: > On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > From: Ollie Wild <[EMAIL PROTECTED]> > > > > Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly > > from the old mm into the new mm.

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Paul Mundt
On Wed, Jun 06, 2007 at 01:36:58AM -0700, Andrew Morton wrote: > On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > From: Ollie Wild <[EMAIL PROTECTED]> > > > > Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly > > from the old mm into the

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Andrew Morton
On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > From: Ollie Wild <[EMAIL PROTECTED]> > > Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly > from the old mm into the new mm. > > We create the new mm before the binfmt code runs, and place

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Tue, 2007-06-05 at 16:39 -0700, Andrew Morton wrote: > > @@ -1620,6 +1600,34 @@ int expand_stack(struct vm_area_struct * > > return error; > > } > > > > +#ifdef CONFIG_STACK_GROWSUP > > +int expand_stack(struct vm_area_struct *vma, unsigned long address) > > +{ > > + return

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Tue, 2007-06-05 at 16:39 -0700, Andrew Morton wrote: @@ -1620,6 +1600,34 @@ int expand_stack(struct vm_area_struct * return error; } +#ifdef CONFIG_STACK_GROWSUP +int expand_stack(struct vm_area_struct *vma, unsigned long address) +{ + return expand_upwards(vma,

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Andrew Morton
On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra [EMAIL PROTECTED] wrote: From: Ollie Wild [EMAIL PROTECTED] Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly from the old mm into the new mm. We create the new mm before the binfmt code runs, and place the new

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Paul Mundt
On Wed, Jun 06, 2007 at 01:36:58AM -0700, Andrew Morton wrote: On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra [EMAIL PROTECTED] wrote: From: Ollie Wild [EMAIL PROTECTED] Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly from the old mm into the new mm.

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 01:36 -0700, Andrew Morton wrote: On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra [EMAIL PROTECTED] wrote: From: Ollie Wild [EMAIL PROTECTED] Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly from the old mm into the new mm. We

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Andrew Morton
On Wed, 06 Jun 2007 10:54:21 +0200 Peter Zijlstra [EMAIL PROTECTED] wrote: It is a bit peculiar in that we have one task with two mm's, one of which is inactive. ... + flush_cache_page(bprm-vma, kpos, +

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 02:06 -0700, Andrew Morton wrote: On Wed, 06 Jun 2007 10:54:21 +0200 Peter Zijlstra [EMAIL PROTECTED] wrote: It is a bit peculiar in that we have one task with two mm's, one of which is inactive. ... +

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 02:06 -0700, Andrew Morton wrote: I think the same problem will happen on NOMMU STACK_GROWS_UP. There are several new references to bprm-vma in there, not all inside CONFIG_MMU. I found two: one in setup_arg_pages() and one in get_arg_page() both are under CONFIG_MMU.

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Paul Mundt
On Wed, Jun 06, 2007 at 11:34:33AM +0200, Peter Zijlstra wrote: +static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos, + struct page *page) +{ + flush_cache_page(bprm-vma, pos, page_to_pfn(page)); +} + [snip] @@ -253,6 +305,17 @@ static void

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Peter Zijlstra
On Wed, 2007-06-06 at 18:44 +0900, Paul Mundt wrote: On Wed, Jun 06, 2007 at 11:34:33AM +0200, Peter Zijlstra wrote: +static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos, + struct page *page) +{ + flush_cache_page(bprm-vma, pos, page_to_pfn(page)); +} +

Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Andi Kleen
could do I guess, but doesn't this modern gcc thing auto inline statics that are so small? Yes it does. -Andi - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [parisc-linux] Re: [PATCH 4/4] mm: variable length argument support

2007-06-06 Thread Grant Grundler
On Wed, Jun 06, 2007 at 11:12:09AM +0200, Peter Zijlstra wrote: ... I think the same problem will happen on NOMMU STACK_GROWS_UP. There are several new references to bprm-vma in there, not all inside CONFIG_MMU. Right, which archs have that combo? I'll go gather cross compilers. parisc

Re: [PATCH 4/4] mm: variable length argument support

2007-06-05 Thread Ollie Wild
OK. It sounds like a healthy dose of comments is in order. I'll clean things up and send out a new patch sometime tonight or tomorrow. Additional comments inline below: > - len = strnlen_user((void __user *)p, PAGE_SIZE*MAX_ARG_PAGES); > - if (!len || len >

Re: [PATCH 4/4] mm: variable length argument support

2007-06-05 Thread Andrew Morton
On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > From: Ollie Wild <[EMAIL PROTECTED]> > > Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly > from the old mm into the new mm. > > We create the new mm before the binfmt code runs, and place

[PATCH 4/4] mm: variable length argument support

2007-06-05 Thread Peter Zijlstra
From: Ollie Wild <[EMAIL PROTECTED]> Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly from the old mm into the new mm. We create the new mm before the binfmt code runs, and place the new stack at the very top of the address space. Once the binfmt code runs and figures

[PATCH 4/4] mm: variable length argument support

2007-06-05 Thread Peter Zijlstra
From: Ollie Wild [EMAIL PROTECTED] Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly from the old mm into the new mm. We create the new mm before the binfmt code runs, and place the new stack at the very top of the address space. Once the binfmt code runs and figures out

Re: [PATCH 4/4] mm: variable length argument support

2007-06-05 Thread Andrew Morton
On Tue, 05 Jun 2007 17:05:27 +0200 Peter Zijlstra [EMAIL PROTECTED] wrote: From: Ollie Wild [EMAIL PROTECTED] Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly from the old mm into the new mm. We create the new mm before the binfmt code runs, and place the new

Re: [PATCH 4/4] mm: variable length argument support

2007-06-05 Thread Ollie Wild
OK. It sounds like a healthy dose of comments is in order. I'll clean things up and send out a new patch sometime tonight or tomorrow. Additional comments inline below: - len = strnlen_user((void __user *)p, PAGE_SIZE*MAX_ARG_PAGES); - if (!len || len