]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Cross Memory Attach: make it Kconfigurable
authorChristopher Yeoh <cyeoh@au1.ibm.com>
Thu, 3 May 2012 05:43:51 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:30 +0000 (15:46 +1000)
Add a Kconfig option to allow people who don't want cross memory attach to
not have it included in their build.

Signed-off-by: Chris Yeoh <yeohc@au1.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/Kconfig
mm/Makefile

index 97ea5cd505d35475c994407d66ac2c25b2331cb2..82fed4eb2b6fe39cfd0476afe46e9589e02b386f 100644 (file)
@@ -349,6 +349,16 @@ choice
          benefit.
 endchoice
 
+config CROSS_MEMORY_ATTACH
+       bool "Cross Memory Support"
+       depends on MMU
+       default y
+       help
+         Enabling this option adds the system calls process_vm_readv and
+         process_vm_writev which allow a process with the correct privileges
+         to directly read from or write to to another process's address space.
+         See the man page for more details.
+
 #
 # UP and nommu archs use km based percpu allocator
 #
index e51fb6f0397e10218e85283ebb6d0117f2726eb6..2e2fbbefb99fa94c97be13aa8fa71da823455409 100644 (file)
@@ -5,8 +5,11 @@
 mmu-y                  := nommu.o
 mmu-$(CONFIG_MMU)      := fremap.o highmem.o madvise.o memory.o mincore.o \
                           mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
-                          vmalloc.o pagewalk.o pgtable-generic.o \
-                          process_vm_access.o
+                          vmalloc.o pagewalk.o pgtable-generic.o
+
+ifdef CONFIG_CROSS_MEMORY_ATTACH
+mmu-$(CONFIG_MMU)      += process_vm_access.o
+endif
 
 obj-y                  := filemap.o mempool.o oom_kill.o fadvise.o \
                           maccess.o page_alloc.o page-writeback.o \