showing locked vms in /proc/pid/maps..

From: Dave Airlie
Date: Sun Jun 27 2004 - 23:56:53 EST



I wanted to know if my VMs were being locked correctly so I through
together this patch for /proc/pid/maps it overloads the read bit with a
capital R for read/locked and an l for non-read/locked..

I'm not sure if this or something like it could be included maybe I'd be
better off overloading the p/s bit with P/S .. or adding a locked field
(didn't like that idea as it might mess up the layout..)..

Dave.

--- ../linux-2.6.4/fs/proc/task_mmu.c 2004-03-15 14:16:06.000000000 +1100
+++ fs/proc/task_mmu.c 2004-06-28 14:45:10.000000000 +1000
@@ -94,7 +94,7 @@
seq_printf(m, "%08lx-%08lx %c%c%c%c %08lx %02x:%02x %lu %n",
map->vm_start,
map->vm_end,
- flags & VM_READ ? 'r' : '-',
+ flags & VM_LOCKED ? (flags & VM_READ ? 'R' : 'l') : (flags & VM_READ ? 'r' : '-'),
flags & VM_WRITE ? 'w' : '-',
flags & VM_EXEC ? 'x' : '-',
flags & VM_MAYSHARE ? 's' : 'p',
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/