mmap wrapping around to 0 revisited

Dan Malek dan at embeddededge.com
Wed Mar 6 10:58:28 EST 2002


David Ashley wrote:

> .... The do_mmap itself is broken, the check
> for overflow is like this:
> 	if ((offset + PAGE_ALIGN(len)) < offset)
> 		goto out;
>
> It should be:
> 	if ((offset + PAGE_ALIGN(len)-1) < offset)
> 		goto out;


This has been fixed and broken over and over more times than
anything else in the kernel.  Anytime someone makes a generic VM
change you can bet this will be broken again.  The only people that
seem to care are those that want to map the last 4K page at the top
of the physical address space from a user application using mmap().
There aren't many of those people :-).


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list