mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@linux.ie>
To: linux-kernel@vger.kernel.org
Subject: showing locked vms in /proc/pid/maps..
Date: Mon, 28 Jun 2004 05:55:25 +0100 (IST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0406280552110.29652@skynet> (raw)


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',

                 reply	other threads:[~2004-06-28  4:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.58.0406280552110.29652@skynet \
    --to=airlied@linux.ie \
    --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

all inboxes | Powered by JetHome®