Re: [PATCH 1/2] setup_arg_pages can insert overlapping vma

From: Hugh Dickins
Date: Thu Nov 18 2004 - 15:33:57 EST


On Thu, 18 Nov 2004, Chris Wright wrote:
> * Hugh Dickins (hugh@xxxxxxxxxxx) wrote:
> >
> > Chris, shouldn't your patch also cover the setup_arg_pages clones for
> > 32-bit support on 64-bit architectures, with something - uncompiled,
> > untested - like the below? I'm not sure how necessary the additional
> > vma->vm_start < mpnt->vm_end test is, but suspect ia64 might need it.
>
> I expect other arches should need the fix as well, it would be nice
> to test them.

ia64, s390 and x86_64 seem to be the only ones with their own code
to insert_vm_struct for 32-bit setup_arg_pages.

> I'm not clear on that extra test. Wouldn't it imply vm_end < vm_start?

Whose vm_end and whose vm_start? Well, no need to answer...

Check the comment on find_vma in mm/mmap.c:
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
but perhaps you thought it returns NULL if addr is not covered by a vma?

If so, maybe your original fs/exec.c fix also needs that check added:
it's usually the case that there cannot be a vma above the stack being
set up here, but I don't know enough of all the architectures to say
that's always so (and it looks like not the case for 32-bit on ia64).

Hugh

-
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/