All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Valdis.Kletnieks@vt.edu
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] add "VmUsers: N" to /proc/$PID/status
Date: Fri, 17 Jul 2009 01:44:27 +0200	[thread overview]
Message-ID: <200907170144.27775.vda.linux@googlemail.com> (raw)
In-Reply-To: <63188.1247786645@turing-police.cc.vt.edu>

On Friday 17 July 2009 01:24, Valdis.Kletnieks@vt.edu wrote:
> > I, indeed, want to have just an N I can divide RSS/VSZ/etc by,
> > to get, say, top display which do not mislead user
> > into thinking that he has 3 processes with 100 megabyte RSS
> > when in reality he has 3 processes sharing a single VM
> > with 100 meg RSS.
> 
> Thinking about it a bit more - it's probably *usually* possible to sort out
> which processes are sharing because if you have 2 sets of shared memory,
> they'll *usually* have different RSS values - so the 2 processes with a
> count of 2 and an RSS of 179M are one set, and the 2 processes with a count
> of 2 and an RSS of 198M are probably another.

Hmm. We can just expose the raw value of task->mm pointer.
For all tasks which share a VM, it will have the same value.

It would be an "information leak", yes, but it isn't obvious
whether it can be exploited at all. We can also obscure it
a bit by XORing or summing it with randomly selected constant
or some such.
--
vda

      reply	other threads:[~2009-07-16 23:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15  1:22 [PATCH] add "VmUsers: N" to /proc/$PID/status Denys Vlasenko
2009-07-16 19:46 ` Valdis.Kletnieks
2009-07-16 21:27   ` Denys Vlasenko
2009-07-16 23:24     ` Valdis.Kletnieks
2009-07-16 23:44       ` Denys Vlasenko [this message]

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=200907170144.27775.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.