lkml.org 
[lkml]   [2012]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Ensure that walk_page_range()'s start and end are page-aligned
Date
MN> Commit message says about walk_pte_range() but commit changes
MN> walk_page_range().

Yep, the issue occurs in walk_pte_range(). The goal was to ensure that
the external interface to it (which is walk_page_range()) does the check
and avoids doing the walk entirely. I think the expectation is that
walk_page_range() is used on aligned addresses. If we put the check in
walk_pte_range() then only walks with a pte_entry handler would fail on
unaligned addresses, which is potentially confusing.

MN> So why not change the condition to addr < end?

That would work, of course, but seems sloppier and less precise. The
existing code was clearly written expecting to walk aligned addresses.

--
Dan Smith
IBM Linux Technology Center
email: danms@us.ibm.com


\
 
 \ /
  Last update: 2012-02-10 21:25    [W:0.117 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site