aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorMatt Mackall <mpm@selenic.com>2008-02-05 01:29:04 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:16 -0500
commit85863e475e59afb027b0113290e3796ee6020b7d (patch)
tree047cc687b98c0261bd3c083f17c090fbf082355f /fs/proc/base.c
parenta6198797cc3fd659b2d81cdf6bb6b9bba9cd93e9 (diff)
maps4: add /proc/pid/pagemap interface
This interface provides a mapping for each page in an address space to its physical page frame number, allowing precise determination of what pages are mapped and what pages are shared between processes. New in this version: - headers gone again (as recommended by Dave Hansen and Alan Cox) - 64-bit entries (as per discussion with Andi Kleen) - swap pte information exported (from Dave Hansen) - page walker callback for holes (from Dave Hansen) - direct put_user I/O (as suggested by Rusty Russell) This patch folds in cleanups and swap PTE support from Dave Hansen <haveblue@us.ibm.com>. Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 1bd646d3fe9a..9004db04efa0 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -783,7 +783,7 @@ out_no_task:
783} 783}
784#endif 784#endif
785 785
786static loff_t mem_lseek(struct file * file, loff_t offset, int orig) 786loff_t mem_lseek(struct file *file, loff_t offset, int orig)
787{ 787{
788 switch (orig) { 788 switch (orig) {
789 case 0: 789 case 0:
@@ -2252,6 +2252,7 @@ static const struct pid_entry tgid_base_stuff[] = {
2252#ifdef CONFIG_MMU 2252#ifdef CONFIG_MMU
2253 REG("clear_refs", S_IWUSR, clear_refs), 2253 REG("clear_refs", S_IWUSR, clear_refs),
2254 REG("smaps", S_IRUGO, smaps), 2254 REG("smaps", S_IRUGO, smaps),
2255 REG("pagemap", S_IRUSR, pagemap),
2255#endif 2256#endif
2256#ifdef CONFIG_SECURITY 2257#ifdef CONFIG_SECURITY
2257 DIR("attr", S_IRUGO|S_IXUGO, attr_dir), 2258 DIR("attr", S_IRUGO|S_IXUGO, attr_dir),
@@ -2580,6 +2581,7 @@ static const struct pid_entry tid_base_stuff[] = {
2580#ifdef CONFIG_MMU 2581#ifdef CONFIG_MMU
2581 REG("clear_refs", S_IWUSR, clear_refs), 2582 REG("clear_refs", S_IWUSR, clear_refs),
2582 REG("smaps", S_IRUGO, smaps), 2583 REG("smaps", S_IRUGO, smaps),
2584 REG("pagemap", S_IRUSR, pagemap),
2583#endif 2585#endif
2584#ifdef CONFIG_SECURITY 2586#ifdef CONFIG_SECURITY
2585 DIR("attr", S_IRUGO|S_IXUGO, attr_dir), 2587 DIR("attr", S_IRUGO|S_IXUGO, attr_dir),