Thread (3 messages) 3 messages, 3 authors, 2012-02-13

Re: [PATCH] Ensure that walk_page_range()'s start and end are page-aligned

From: David Rientjes <rientjes@google.com>
Date: 2012-02-13 10:12:26
Also in: lkml

On Fri, 10 Feb 2012, Dan Smith wrote:
The inner function walk_pte_range() increments "addr" by PAGE_SIZE after
each pte is processed, and only exits the loop if the result is equal to
"end". Current, if either (or both of) the starting or ending addresses
passed to walk_page_range() are not page-aligned, then we will never
satisfy that exit condition and begin calling the pte_entry handler with
bad data.

To be sure that we will land in the right spot, this patch checks that
both "addr" and "end" are page-aligned in walk_page_range() before starting
the traversal.
It doesn't "ensure" anything without CONFIG_DEBUG_VM enabled, which isn't 
the default.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help