[uClinux-dev] [PATCH] : Avoid filename < TASK_SIZE test in do_getname() when no MMU

Jamie Lokier jamie at shareable.org
Mon May 24 19:19:21 EDT 2010


David Howells wrote:
> Jamie Lokier <jamie at shareable.org> wrote:
> 
> > TASK_SIZE is the wrong kind of check on no-MMU: A better check is that
> > the address is within the userspace mappable address range, whatever
> > that is, which may start at some value and end at some other value,
> > and may have holes.
> 
> I don't really think a comprehensive address check is a good idea.  It would
> take too long to scan the mmap list for each address passed in to a system
> call.  Better just not to do the check, or limit it to some reasonable upper
> bound as we do now.

Oh I agree.  I meant the limit should be reasonable for the
architecture or machine config.

For example if you have a no-MMU architecture where the mappable range
is 0xc0000000 to 0xffffffff, say, the TASK_SIZE upper bound doesn't
make any sense, but a lower bound check against 0xc0000000 would make sense.

-- Jamie



More information about the uClinux-dev mailing list