linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Christoph Lameter <cl@gentwo.org>
Cc: Vasiliy Kulikov <segoon@openwall.com>,
	kernel-hardening@lists.openwall.com,
	Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Kees Cook <kees@ubuntu.com>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Valdis.Kletnieks@vt.edu,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Alan Cox <alan@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: restrict access to /proc/meminfo
Date: Tue, 27 Sep 2011 13:33:24 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1109271328151.24402@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1109271459180.13797@router.home>

On Tue, 27 Sep 2011, Christoph Lameter wrote:

> Viewing free memory is usually necessary to check on reclaim activities
> (things otherwise operating normally). "free" memory (in the sense of the
> memory that an application can still allocate) is not really displayed by
> free. Wish we had a new free that avoids all the misinterpretations.
> 
> Meminfo is also requires by vmstat.
> 

Even with the patch, you could still get all this information by summing 
up the per-node meminfo in /sys/devices/system/node/nodeX/meminfo.  
Non-root users certainly need to be able to use things like numactl and be 
able to specify their own mempolicies for NUMA machines, so limiting basic 
memory state information isn't going to work.

I'd much rather just convert everything to use MB rather than KB so you 
can't determine things at a page level.  I think that gets us much closer 
to what the patch is intending to restrict.  But I also expect some 
breakage from things that just expect meminfo to be in KB units without 
parsing what the kernel is exporting.

> If we want to go down this route then we need some sort of diagnostic
> group that a user must be part of in order to allow viewing of basic
> memory statistics.
> 

It'll turn into another one of our infinite number of capabilities.  Does 
anything actually care about statistics at KB granularity these days?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-09-27 20:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 17:54 [PATCH 1/2] mm: restrict access to slab files under procfs and sysfs Vasiliy Kulikov
2011-09-27 17:56 ` [PATCH 2/2] mm: restrict access to /proc/meminfo Vasiliy Kulikov
2011-09-27 18:27   ` David Rientjes
2011-09-27 19:14     ` Vasiliy Kulikov
2011-09-27 19:38   ` Vasiliy Kulikov
2011-09-27 20:03     ` Christoph Lameter
2011-09-27 20:33       ` David Rientjes [this message]
2011-09-27 20:47         ` Christoph Lameter
2011-09-28 20:31           ` Dave Hansen
2011-09-28 20:52             ` Alan Cox
2011-09-29  0:43             ` Valdis.Kletnieks
2011-09-29 14:11               ` Christoph Lameter
2011-09-29 16:18         ` Vasiliy Kulikov
2011-09-29 16:30           ` Dave Hansen
2011-09-29 16:43             ` [kernel-hardening] " Vasiliy Kulikov
2011-09-29 16:57           ` Valdis.Kletnieks
2011-09-29 17:25             ` [kernel-hardening] " Vasiliy Kulikov
2011-09-29 17:28           ` Vasiliy Kulikov
2011-09-28 21:46     ` Andrew Morton
2011-09-30 19:53       ` Vasiliy Kulikov
2011-09-30 20:03         ` Andrew Morton
2011-09-30 20:12           ` Vasiliy Kulikov
2011-09-30 20:15           ` Dave Hansen
2011-09-27 18:08 ` [PATCH 1/2] mm: restrict access to slab files under procfs and sysfs Christoph Lameter
2011-09-27 19:16   ` Vasiliy Kulikov
2011-09-27 19:35     ` Christoph Lameter
2011-09-27 18:21 ` David Rientjes
2011-09-27 20:00   ` Pekka Enberg

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=alpine.DEB.2.00.1109271328151.24402@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=cl@gentwo.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=kees@ubuntu.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@kernel.org \
    --cc=segoon@openwall.com \
    --cc=torvalds@linux-foundation.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