From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Alexey Dobriyan <adobriyan@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Kees Cook <keescook@chromium.org>,
Matthew Wilcox <willy@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [RFC] process /proc/PID/smaps vs /proc/PID/smaps_rollup
Date: Tue, 29 Sep 2020 11:05:20 +0900 [thread overview]
Message-ID: <20200929020520.GC871730@jagdpanzerIV.localdomain> (raw)
Hello,
One of our unprivileged daemon process needs process PSS info. That
info is usually available in /proc/PID/smaps on per-vma basis, on
in /proc/PID/smaps_rollup as a bunch of accumulated per-vma values.
The latter one is much faster and simpler to get, but, unlike smaps,
smaps_rollup requires PTRACE_MODE_READ, which we don't want to
grant to our unprivileged daemon.
So the question is - can we get, somehow, accumulated PSS info from
a non-privileged process? (Iterating through all process' smaps
vma-s consumes quite a bit of CPU time). This is related to another
question - why do smaps and smaps_rollup have different permission
requirements?
-ss
next reply other threads:[~2020-09-29 2:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 2:05 Sergey Senozhatsky [this message]
2020-09-29 2:40 ` Sergey Senozhatsky
2022-09-08 9:42 ` Vincent Whitchurch
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=20200929020520.GC871730@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky@gmail.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.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®