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

David Howells dhowells at redhat.com
Mon May 24 17:21:40 EDT 2010


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.

For FRV, the lower limit can be as low as 1 and the upper limit (if doing XIP)
0xffffffff.

David



More information about the uClinux-dev mailing list