Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christopher Yeoh and committed by
Linus Torvalds
5febcbe9 eb6332a5

+15 -2
+10
mm/Kconfig
··· 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 #
+5 -2
mm/Makefile
··· 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 \