public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christopher Yeoh <cyeoh@au1.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Adds Kconfig option for Cross Memory Attach
Date: Mon, 23 Apr 2012 13:42:43 +0930	[thread overview]
Message-ID: <20120423134243.5ac73596@Gantu> (raw)

Hi Andrew,

Attached is a patch which you asked for a while back which adds a
Kconfig option to allow people who don't want cross memory attach to not
have it included in their build.

Regards,

Chris
-- 
cyeoh@au.ibm.com

Signed-off-by: Chris Yeoh <yeohc@au1.ibm.com>
 Kconfig  |   11 +++++++++++
 Makefile |    7 +++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index e338407..7619f90 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -379,3 +379,14 @@ config CLEANCACHE
 	  in a negligible performance hit.
 
 	  If unsure, say Y to enable cleancache
+
+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.
+
diff --git a/mm/Makefile b/mm/Makefile
index 50ec00e..1ddd00f 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -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 \


             reply	other threads:[~2012-04-23  5:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  4:12 Christopher Yeoh [this message]
2012-04-23 15:48 ` [PATCH] Adds Kconfig option for Cross Memory Attach Randy Dunlap
2012-04-24  2:13   ` Christopher Yeoh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120423134243.5ac73596@Gantu \
    --to=cyeoh@au1.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox