LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.cz>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Hugh Dickins <hugh@veritas.com>, Pavel Machek <pavel@ucw.cz>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Document randomize_va_space and CONFIG_COMPAT_BRK (was Re: [PATCH 2/2] ASLR: add possibility for more fine-grained tweaking)
Date: Wed, 6 Feb 2008 17:26:37 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0802061650230.30955@jikos.suse.cz> (raw)
In-Reply-To: <20080206134959.GA25689@elte.hu>

On Wed, 6 Feb 2008, Ingo Molnar wrote:

> i've already added the patch below to x86.git.

OK, cool, thanks.

Still, I think that we want the Documentation/sysctl/kernel.txt part of my 
patch probably. Updated patch below.


From: Jiri Kosina <jkosina@suse.cz>

Document randomize_va_space and CONFIG_COMPAT_BRK

diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 8984a53..dc8801d 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -41,6 +41,7 @@ show up in /proc/sys/kernel:
 - pid_max
 - powersave-nap               [ PPC only ]
 - printk
+- randomize_va_space
 - real-root-dev               ==> Documentation/initrd.txt
 - reboot-cmd                  [ SPARC only ]
 - rtsig-max
@@ -280,6 +281,34 @@ send before ratelimiting kicks in.
 
 ==============================================================
 
+randomize-va-space:
+
+This option can be used to select the type of process address
+space randomization that is used in the system, for architectures
+that support this feature.
+
+0 - Turn the process address space randomization off by default.
+
+1 - Make the addresses of mmap base, stack and VDSO page randomized.
+    This, among other things, implies that shared libraries will be
+    loaded to random addresses. Also for PIE-linked binaries, the location
+    of code start is randomized.
+
+    With heap randomization, the situation is a little bit more
+    complicated.
+    There a few legacy applications out there (such as some ancient
+    versions of libc.so.5 from 1996) that assume that brk area starts
+    just after the end of the code+bss. These applications break when
+    start of the brk area is randomized. There are however no known
+    non-legacy applications that would be broken this way, so for most
+    systems it is safe to choose full randomization. However there is
+    a CONFIG_COMPAT_BRK option for systems with ancient and/or broken
+    binaries, that makes heap non-randomized, but keeps all other
+    parts of process address space randomized if randomize_va_space
+    sysctl is turned on.
+
+==============================================================
+
 reboot-cmd: (Sparc only)
 
 ??? This seems to be a way to give an argument to the Sparc

  reply	other threads:[~2008-02-06 16:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 13:45 [PATCH 0/2] brk and randomization fixes Jiri Kosina
2008-02-06 13:45 ` [PATCH 1/2] brk: check the lower bound properly Jiri Kosina
2008-02-06 13:45 ` [PATCH 2/2] ASLR: add possibility for more fine-grained tweaking Jiri Kosina
2008-02-06 13:49   ` Ingo Molnar
2008-02-06 16:26     ` Jiri Kosina [this message]
2008-02-06 23:10       ` [PATCH] Document randomize_va_space and CONFIG_COMPAT_BRK (was Re: [PATCH 2/2] ASLR: add possibility for more fine-grained tweaking) Ingo Molnar
2008-02-07  9:49         ` Jiri Kosina
2008-02-07 14:30         ` Jiri Kosina
2008-02-07 15:01           ` Ingo Molnar
2008-02-07 10:23     ` [PATCH 2/2] ASLR: add possibility for more fine-grained tweaking Geert Uytterhoeven
2008-02-07 10:31       ` Ismail Dönmez
2008-02-07 10:32       ` Ingo Molnar
2008-02-07 10:43         ` Geert Uytterhoeven

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.64.0802061650230.30955@jikos.suse.cz \
    --to=jkosina@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=randy.dunlap@oracle.com \
    --subject='[PATCH] Document randomize_va_space and CONFIG_COMPAT_BRK (was Re: [PATCH 2/2] ASLR: add possibility for more fine-grained tweaking)' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).