All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>, Hillf Danton <dhillf@gmail.com>
Subject: Re: [PATCH] MM: Support more pagesizes for MAP_HUGETLB/SHM_HUGETLB v6
Date: Mon, 22 Oct 2012 14:39:40 -0700	[thread overview]
Message-ID: <20121022143940.6bf8103f.akpm@linux-foundation.org> (raw)
In-Reply-To: <20121022132733.GQ16230@one.firstfloor.org>

On Mon, 22 Oct 2012 15:27:33 +0200
Andi Kleen <andi@firstfloor.org> wrote:

> BTW seriously MAP_UNINITIALIZED? Who came up with that? 
> MAP_COMPLETELY_INSECURE or MAP_INSANE would have been more appropiate.

heh.  It's a NOMMU-only thing.


config MMAP_ALLOW_UNINITIALIZED
	bool "Allow mmapped anonymous memory to be uninitialized"
	depends on EXPERT && !MMU
	default n
	help
	  Normally, and according to the Linux spec, anonymous memory obtained
	  from mmap() has it's contents cleared before it is passed to
	  userspace.  Enabling this config option allows you to request that
	  mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus
	  providing a huge performance boost.  If this option is not enabled,
	  then the flag will be ignored.

	  This is taken advantage of by uClibc's malloc(), and also by
	  ELF-FDPIC binfmt's brk and stack allocator.

	  Because of the obvious security issues, this option should only be
	  enabled on embedded devices where you control what is run in
	  userspace.  Since that isn't generally a problem on no-MMU systems,
	  it is normally safe to say Y here.

	  See Documentation/nommu-mmap.txt for more information.


WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>, Hillf Danton <dhillf@gmail.com>
Subject: Re: [PATCH] MM: Support more pagesizes for MAP_HUGETLB/SHM_HUGETLB v6
Date: Mon, 22 Oct 2012 14:39:40 -0700	[thread overview]
Message-ID: <20121022143940.6bf8103f.akpm@linux-foundation.org> (raw)
In-Reply-To: <20121022132733.GQ16230@one.firstfloor.org>

On Mon, 22 Oct 2012 15:27:33 +0200
Andi Kleen <andi@firstfloor.org> wrote:

> BTW seriously MAP_UNINITIALIZED? Who came up with that? 
> MAP_COMPLETELY_INSECURE or MAP_INSANE would have been more appropiate.

heh.  It's a NOMMU-only thing.


config MMAP_ALLOW_UNINITIALIZED
	bool "Allow mmapped anonymous memory to be uninitialized"
	depends on EXPERT && !MMU
	default n
	help
	  Normally, and according to the Linux spec, anonymous memory obtained
	  from mmap() has it's contents cleared before it is passed to
	  userspace.  Enabling this config option allows you to request that
	  mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus
	  providing a huge performance boost.  If this option is not enabled,
	  then the flag will be ignored.

	  This is taken advantage of by uClibc's malloc(), and also by
	  ELF-FDPIC binfmt's brk and stack allocator.

	  Because of the obvious security issues, this option should only be
	  enabled on embedded devices where you control what is run in
	  userspace.  Since that isn't generally a problem on no-MMU systems,
	  it is normally safe to say Y here.

	  See Documentation/nommu-mmap.txt for more information.

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2012-10-22 21:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 16:48 [PATCH] MM: Support more pagesizes for MAP_HUGETLB/SHM_HUGETLB v6 Andi Kleen
2012-10-19 16:48 ` Andi Kleen
2012-10-20  3:39 ` Hillf Danton
2012-10-20  3:39   ` Hillf Danton
2012-10-22 11:27 ` Michael Kerrisk
2012-10-22 11:27   ` Michael Kerrisk
2012-10-22 13:27   ` Andi Kleen
2012-10-22 13:27     ` Andi Kleen
2012-10-22 13:35     ` Andi Kleen
2012-10-22 13:35       ` Andi Kleen
2012-10-22 13:56       ` Michael Kerrisk (man-pages)
2012-10-22 13:56         ` Michael Kerrisk (man-pages)
2012-10-22 15:36         ` Andi Kleen
2012-10-22 15:36           ` Andi Kleen
2012-10-22 15:53           ` Michael Kerrisk (man-pages)
2012-10-22 15:53             ` Michael Kerrisk (man-pages)
2012-10-22 16:11             ` Andi Kleen
2012-10-22 16:11               ` Andi Kleen
2012-10-22 16:23               ` Michael Kerrisk (man-pages)
2012-10-22 16:23                 ` Michael Kerrisk (man-pages)
2012-10-22 16:29                 ` Andi Kleen
2012-10-22 16:29                   ` Andi Kleen
2012-10-22 16:42                   ` Michael Kerrisk (man-pages)
2012-10-22 16:42                     ` Michael Kerrisk (man-pages)
2012-10-23  1:45                 ` Benjamin Herrenschmidt
2012-10-23  1:45                   ` Benjamin Herrenschmidt
2012-10-23  1:44             ` Benjamin Herrenschmidt
2012-10-23  1:44               ` Benjamin Herrenschmidt
2012-10-23  2:28               ` Andi Kleen
2012-10-23  2:28                 ` Andi Kleen
2012-10-23  7:37                 ` Michael Kerrisk (man-pages)
2012-10-23  7:37                   ` Michael Kerrisk (man-pages)
2012-10-23 13:39                   ` Andi Kleen
2012-10-23 13:39                     ` Andi Kleen
2012-10-23 22:56           ` Valdis.Kletnieks
2012-10-22 21:39     ` Andrew Morton [this message]
2012-10-22 21:39       ` Andrew Morton

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=20121022143940.6bf8103f.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtk.manpages@gmail.com \
    /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.