|
|
Subscribe / Log in / New account

[RFC 18/18] proc: present VM_LOCKED memory in /proc/self/maps

From:  Topi Miettinen <toiwoton-AT-gmail.com>
To:  linux-kernel-AT-vger.kernel.org
Subject:  [RFC 18/18] proc: present VM_LOCKED memory in /proc/self/maps
Date:  Mon, 13 Jun 2016 22:44:25 +0300
Message-ID:  <1465847065-3577-19-git-send-email-toiwoton@gmail.com>
Cc:  Topi Miettinen <toiwoton-AT-gmail.com>, Andrew Morton <akpm-AT-linux-foundation.org>, Michal Hocko <mhocko-AT-suse.com>, Konstantin Khlebnikov <koct9i-AT-gmail.com>, Vlastimil Babka <vbabka-AT-suse.cz>, "Kirill A. Shutemov" <kirill.shutemov-AT-linux.intel.com>, Jerome Marchand <jmarchan-AT-redhat.com>, Laurent Dufour <ldufour-AT-linux.vnet.ibm.com>, Naoya Horiguchi <n-horiguchi-AT-ah.jp.nec.com>, Gerald Schaefer <gerald.schaefer-AT-de.ibm.com>, Johannes Weiner <hannes-AT-cmpxchg.org>
Archive‑link:  Article

Add a flag to /proc/self/maps to show that the memory area is locked.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
---
 fs/proc/task_mmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 4648c7f..8229509 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -313,13 +313,14 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
 		end -= PAGE_SIZE;
 
 	seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
-	seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
+	seq_printf(m, "%08lx-%08lx %c%c%c%c%c %08llx %02x:%02x %lu ",
 			start,
 			end,
 			flags & VM_READ ? 'r' : '-',
 			flags & VM_WRITE ? 'w' : '-',
 			flags & VM_EXEC ? 'x' : '-',
 			flags & VM_MAYSHARE ? 's' : 'p',
+			flags & VM_LOCKED ? 'l' : '-',
 			pgoff,
 			MAJOR(dev), MINOR(dev), ino);
 
-- 
2.8.1





to post comments


Copyright © 2016, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds