Commit 5febcbe99d4766cc383909c447e002e63d8b4592
Committed by
Linus Torvalds
1 parent
eb6332a545
Exists in
master
and in
20 other branches
Cross Memory Attach: make it Kconfigurable
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 15 additions and 2 deletions Side-by-side Diff
mm/Kconfig
... | ... | @@ -349,6 +349,16 @@ |
349 | 349 | benefit. |
350 | 350 | endchoice |
351 | 351 | |
352 | +config CROSS_MEMORY_ATTACH | |
353 | + bool "Cross Memory Support" | |
354 | + depends on MMU | |
355 | + default y | |
356 | + help | |
357 | + Enabling this option adds the system calls process_vm_readv and | |
358 | + process_vm_writev which allow a process with the correct privileges | |
359 | + to directly read from or write to to another process's address space. | |
360 | + See the man page for more details. | |
361 | + | |
352 | 362 | # |
353 | 363 | # UP and nommu archs use km based percpu allocator |
354 | 364 | # |
mm/Makefile
... | ... | @@ -5,8 +5,11 @@ |
5 | 5 | mmu-y := nommu.o |
6 | 6 | mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \ |
7 | 7 | mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \ |
8 | - vmalloc.o pagewalk.o pgtable-generic.o \ | |
9 | - process_vm_access.o | |
8 | + vmalloc.o pagewalk.o pgtable-generic.o | |
9 | + | |
10 | +ifdef CONFIG_CROSS_MEMORY_ATTACH | |
11 | +mmu-$(CONFIG_MMU) += process_vm_access.o | |
12 | +endif | |
10 | 13 | |
11 | 14 | obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ |
12 | 15 | maccess.o page_alloc.o page-writeback.o \ |