From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424465AbcFMTsw (ORCPT ); Mon, 13 Jun 2016 15:48:52 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35604 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423023AbcFMTst (ORCPT ); Mon, 13 Jun 2016 15:48:49 -0400 From: Topi Miettinen To: linux-kernel@vger.kernel.org Cc: Topi Miettinen , Andrew Morton , Michal Hocko , Konstantin Khlebnikov , Vlastimil Babka , "Kirill A. Shutemov" , Jerome Marchand , Laurent Dufour , Naoya Horiguchi , Gerald Schaefer , Johannes Weiner 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> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1465847065-3577-1-git-send-email-toiwoton@gmail.com> References: <1465847065-3577-1-git-send-email-toiwoton@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a flag to /proc/self/maps to show that the memory area is locked. Signed-off-by: Topi Miettinen --- 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