mm/swap.c: not necessary to export __pagevec_lru_add()
[linux-2.6-microblaze.git] / mm / mremap.c
index af36306..d28f08a 100644 (file)
@@ -606,6 +606,16 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
        LIST_HEAD(uf_unmap_early);
        LIST_HEAD(uf_unmap);
 
+       /*
+        * There is a deliberate asymmetry here: we strip the pointer tag
+        * from the old address but leave the new address alone. This is
+        * for consistency with mmap(), where we prevent the creation of
+        * aliasing mappings in userspace by leaving the tag bits of the
+        * mapping address intact. A non-zero tag will cause the subsequent
+        * range checks to reject the address as invalid.
+        *
+        * See Documentation/arm64/tagged-address-abi.rst for more information.
+        */
        addr = untagged_addr(addr);
 
        if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))