mm/mremap: Add comment explaining the untagging behaviour of mremap()
Commit dcde2373 ("mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()") changed mremap() so that only the 'old' address is untagged, leaving the 'new' address in the form it was passed from userspace. This prevents the unexpected creation of aliasing virtual mappings in userspace, but looks a bit odd when you read the code. Add a comment justifying the untagging behaviour in mremap(). Reported-by: NLinus Torvalds <torvalds@linux-foundation.org> Acked-by: NLinus Torvalds <torvalds@linux-foundation.org> Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com> Signed-off-by: NWill Deacon <will@kernel.org> Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
Showing
想要评论请 注册 或 登录