The patch titled
     revoke: special mmap handling
has been removed from the -mm tree.  Its filename was
     revoke-special-mmap-handling.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: revoke: special mmap handling
From: Pekka Enberg <[EMAIL PROTECTED]>

This adds special handling for revoked memory mappings.  We want to raise
SIGBUS when accessing revoked mappings and return ENODEV when trying to remap
with mmap(2).

Acked-by: Alan Cox <[EMAIL PROTECTED]>
Signed-off-by: Pekka Enberg <[EMAIL PROTECTED]>
Cc: Christoph Hellwig <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 include/linux/mm.h |    1 +
 mm/memory.c        |    3 +++
 mm/mmap.c          |   12 ++++++++----
 3 files changed, 12 insertions(+), 4 deletions(-)

diff -puN include/linux/mm.h~revoke-special-mmap-handling include/linux/mm.h
--- a/include/linux/mm.h~revoke-special-mmap-handling
+++ a/include/linux/mm.h
@@ -104,6 +104,7 @@ extern unsigned int kobjsize(const void 
 #define VM_MAPPED_COPY 0x01000000      /* T if mapped copy of data (nommu 
mmap) */
 #define VM_INSERTPAGE  0x02000000      /* The vma has had "vm_insert_page()" 
done on it */
 #define VM_ALWAYSDUMP  0x04000000      /* Always include in core dumps */
+#define VM_REVOKED     0x08000000      /* Mapping has been revoked */
 
 #define VM_CAN_NONLINEAR 0x08000000    /* Has ->fault & does nonlinear pages */
 
diff -puN mm/memory.c~revoke-special-mmap-handling mm/memory.c
--- a/mm/memory.c~revoke-special-mmap-handling
+++ a/mm/memory.c
@@ -2466,6 +2466,9 @@ int handle_mm_fault(struct mm_struct *mm
        if (unlikely(is_vm_hugetlb_page(vma)))
                return hugetlb_fault(mm, vma, address, write_access);
 
+       if (unlikely(vma->vm_flags & VM_REVOKED))
+               return VM_FAULT_SIGBUS;
+
        pgd = pgd_offset(mm, address);
        pud = pud_alloc(mm, pgd, address);
        if (!pud)
diff -puN mm/mmap.c~revoke-special-mmap-handling mm/mmap.c
--- a/mm/mmap.c~revoke-special-mmap-handling
+++ a/mm/mmap.c
@@ -1083,10 +1083,14 @@ unsigned long mmap_region(struct file *f
        error = -ENOMEM;
 munmap_back:
        vma = find_vma_prepare(mm, addr, &prev, &rb_link, &rb_parent);
-       if (vma && vma->vm_start < addr + len) {
-               if (do_munmap(mm, addr, len))
-                       return -ENOMEM;
-               goto munmap_back;
+       if (vma) {
+               if (unlikely(vma->vm_flags & VM_REVOKED))
+                       return -ENODEV;
+               if (vma->vm_start < addr + len) {
+                       if (do_munmap(mm, addr, len))
+                               return -ENOMEM;
+                       goto munmap_back;
+               }
        }
 
        /* Check against address space limit. */
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

git-unionfs.patch
slub-consolidate-add_partial-and-add_partial_tail-to-one-function.patch
slub-fix-coding-style-violations.patch
slub-fix-coding-style-violations-checkpatch-fixes.patch
slub-noinline-some-functions-to-avoid-them-being-folded-into-alloc-free.patch
slub-move-kmem_cache_node-determination-into-add_full-and-add_partial.patch
slub-avoid-checking-for-a-valid-object-before-zeroing-on-the-fast-path.patch
slub-__slab_alloc-exit-path-consolidation.patch
slub-provide-unique-end-marker-for-each-slab.patch
slub-provide-unique-end-marker-for-each-slab-fix.patch
slub-avoid-referencing-kmem_cache-structure-in-__slab_alloc.patch
slub-optional-fast-path-using-cmpxchg_local.patch
slub-do-our-own-locking-via-slab_lock-and-slab_unlock.patch
slub-do-our-own-locking-via-slab_lock-and-slab_unlock-checkpatch-fixes.patch
slub-restructure-slab-alloc.patch
revoke-special-mmap-handling.patch
revoke-special-mmap-handling-vs-fault-vs-invalidate.patch
revoke-core-code.patch
revoke-support-for-ext2-and-ext3.patch
revoke-add-documentation.patch
revoke-wire-up-i386-system-calls.patch
revoke-vs-git-block.patch
slab-leaks3-default-y.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to