public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] doc: missing value 2 for randomize-va-space
@ 2009-07-02 15:23 Horst Schirmeier
  2009-07-02 23:11 ` Jiri Kosina
  0 siblings, 1 reply; 6+ messages in thread
From: Horst Schirmeier @ 2009-07-02 15:23 UTC (permalink / raw)
  To: rdunlap; +Cc: linux-doc, linux-kernel, trivial

The documentation for /proc/sys/kernel/* does not mention the possible
value 2 for randomize-va-space (but already mentions what it does).

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
---
 Documentation/sysctl/kernel.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 322a00b..b2af4ef 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -310,7 +310,7 @@ that support this feature.
     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
+2 - 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

-- 
PGP-Key 0xD40E0E7A

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: missing value 2 for randomize-va-space
  2009-07-02 15:23 [PATCH] doc: missing value 2 for randomize-va-space Horst Schirmeier
@ 2009-07-02 23:11 ` Jiri Kosina
  2009-07-03  0:05   ` Horst Schirmeier
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2009-07-02 23:11 UTC (permalink / raw)
  To: Horst Schirmeier; +Cc: rdunlap, linux-doc, linux-kernel

On Thu, 2 Jul 2009, Horst Schirmeier wrote:

> The documentation for /proc/sys/kernel/* does not mention the possible
> value 2 for randomize-va-space (but already mentions what it does).

Hmm, while you are at it ...

>  Documentation/sysctl/kernel.txt |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
> index 322a00b..b2af4ef 100644
> --- a/Documentation/sysctl/kernel.txt
> +++ b/Documentation/sysctl/kernel.txt
> @@ -310,7 +310,7 @@ that support this feature.
>      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
> +2 - With heap randomization, the situation is a little bit more
>      complicated.
>      There a few legacy applications out there (such as some ancient

... would you please fix this typo/grammo as well? (There a few ...)

>      versions of libc.so.5 from 1996) that assume that brk area starts

Also, the text itself doesn't seem to be super-clear ... namely, it 
describes what CONFIG_COMPAT_BRK is about, but doesn't really clarify how 
exactly does this correlate with randomize_va_space == 2. Would you mind 
also fixing this bit?

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: missing value 2 for randomize-va-space
  2009-07-02 23:11 ` Jiri Kosina
@ 2009-07-03  0:05   ` Horst Schirmeier
  2009-07-03 10:01     ` Jiri Kosina
  0 siblings, 1 reply; 6+ messages in thread
From: Horst Schirmeier @ 2009-07-03  0:05 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: rdunlap, linux-doc, linux-kernel, trivial

On Fri, 03 Jul 2009, Jiri Kosina wrote:
> >      There a few legacy applications out there (such as some ancient
> 
> ... would you please fix this typo/grammo as well? (There a few ...)
> 
> >      versions of libc.so.5 from 1996) that assume that brk area starts
> 
> Also, the text itself doesn't seem to be super-clear ... namely, it 
> describes what CONFIG_COMPAT_BRK is about, but doesn't really clarify how 
> exactly does this correlate with randomize_va_space == 2. Would you mind 
> also fixing this bit?

I hope I didn't misread the sources :-)  Opinions?

---

The documentation for /proc/sys/kernel/* does not mention the possible
value 2 for randomize-va-space yet.  While being there, doing some
reformatting, fixing grammar problems and clarifying the correlations
between randomize-va-space, kernel parameter "norandmaps" and the
CONFIG_COMPAT_BRK option.
                                                    
Signed-off-by: Horst Schirmeier <horst@schirmeier.com>

---
 Documentation/sysctl/kernel.txt |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 322a00b..dd8322f 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -303,25 +303,29 @@ 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.
+0 - Turn the process address space randomization off.  This is the
+    default for architectures that do not support this feature anyways,
+    and kernels that are booted with the "norandmaps" parameter.
 
 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.
+    loaded to random addresses.  Also for PIE-linked binaries, the
+    location of code start is randomized.  This is the default if the
+    CONFIG_COMPAT_BRK option is enabled.
 
-    With heap randomization, the situation is a little bit more
-    complicated.
-    There a few legacy applications out there (such as some ancient
+2 - Additionally enable heap randomization.  This is the default if
+    CONFIG_COMPAT_BRK is disabled.
+
+    There are 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
+    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.
+    systems it is safe to choose full randomization.
+
+    Systems with ancient and/or broken binaries should be configured
+    with CONFIG_COMPAT_BRK enabled, which excludes the heap from process
+    address space randomization.
 
 ==============================================================
 

-- 
PGP-Key 0xD40E0E7A

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: missing value 2 for randomize-va-space
  2009-07-03  0:05   ` Horst Schirmeier
@ 2009-07-03 10:01     ` Jiri Kosina
  2009-07-03 10:24       ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2009-07-03 10:01 UTC (permalink / raw)
  To: Horst Schirmeier; +Cc: rdunlap, linux-doc, linux-kernel, Ingo Molnar


[ added Ingo to CC ]

On Fri, 3 Jul 2009, Horst Schirmeier wrote:

> On Fri, 03 Jul 2009, Jiri Kosina wrote:
> > >      There a few legacy applications out there (such as some ancient
> > 
> > ... would you please fix this typo/grammo as well? (There a few ...)
> > 
> > >      versions of libc.so.5 from 1996) that assume that brk area starts
> > 
> > Also, the text itself doesn't seem to be super-clear ... namely, it 
> > describes what CONFIG_COMPAT_BRK is about, but doesn't really clarify how 
> > exactly does this correlate with randomize_va_space == 2. Would you mind 
> > also fixing this bit?
> 
> I hope I didn't misread the sources :-)  Opinions?
> 
> ---
> 
> The documentation for /proc/sys/kernel/* does not mention the possible
> value 2 for randomize-va-space yet.  While being there, doing some
> reformatting, fixing grammar problems and clarifying the correlations
> between randomize-va-space, kernel parameter "norandmaps" and the
> CONFIG_COMPAT_BRK option.
>                                                     
> Signed-off-by: Horst Schirmeier <horst@schirmeier.com>

Acked-by: Jiri Kosina <jkosina@suse.cz>

Ingo, will you take this through your tree?

> 
> ---
>  Documentation/sysctl/kernel.txt |   30 +++++++++++++++++-------------
>  1 files changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
> index 322a00b..dd8322f 100644
> --- a/Documentation/sysctl/kernel.txt
> +++ b/Documentation/sysctl/kernel.txt
> @@ -303,25 +303,29 @@ 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.
> +0 - Turn the process address space randomization off.  This is the
> +    default for architectures that do not support this feature anyways,
> +    and kernels that are booted with the "norandmaps" parameter.
>  
>  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.
> +    loaded to random addresses.  Also for PIE-linked binaries, the
> +    location of code start is randomized.  This is the default if the
> +    CONFIG_COMPAT_BRK option is enabled.
>  
> -    With heap randomization, the situation is a little bit more
> -    complicated.
> -    There a few legacy applications out there (such as some ancient
> +2 - Additionally enable heap randomization.  This is the default if
> +    CONFIG_COMPAT_BRK is disabled.
> +
> +    There are 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
> +    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.
> +    systems it is safe to choose full randomization.
> +
> +    Systems with ancient and/or broken binaries should be configured
> +    with CONFIG_COMPAT_BRK enabled, which excludes the heap from process
> +    address space randomization.
>  
>  ==============================================================
>  
> 
> -- 
> PGP-Key 0xD40E0E7A
> 

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: missing value 2 for randomize-va-space
  2009-07-03 10:01     ` Jiri Kosina
@ 2009-07-03 10:24       ` Ingo Molnar
  2009-07-03 10:26         ` Jiri Kosina
  0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2009-07-03 10:24 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Horst Schirmeier, rdunlap, linux-doc, linux-kernel


* Jiri Kosina <jkosina@suse.cz> wrote:

> 
> [ added Ingo to CC ]
> 
> On Fri, 3 Jul 2009, Horst Schirmeier wrote:
> 
> > On Fri, 03 Jul 2009, Jiri Kosina wrote:
> > > >      There a few legacy applications out there (such as some ancient
> > > 
> > > ... would you please fix this typo/grammo as well? (There a few ...)
> > > 
> > > >      versions of libc.so.5 from 1996) that assume that brk area starts
> > > 
> > > Also, the text itself doesn't seem to be super-clear ... namely, it 
> > > describes what CONFIG_COMPAT_BRK is about, but doesn't really clarify how 
> > > exactly does this correlate with randomize_va_space == 2. Would you mind 
> > > also fixing this bit?
> > 
> > I hope I didn't misread the sources :-)  Opinions?
> > 
> > ---
> > 
> > The documentation for /proc/sys/kernel/* does not mention the possible
> > value 2 for randomize-va-space yet.  While being there, doing some
> > reformatting, fixing grammar problems and clarifying the correlations
> > between randomize-va-space, kernel parameter "norandmaps" and the
> > CONFIG_COMPAT_BRK option.
> >                                                     
> > Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
> 
> Acked-by: Jiri Kosina <jkosina@suse.cz>
> 
> Ingo, will you take this through your tree?
> 
> > 
> > ---
> >  Documentation/sysctl/kernel.txt |   30 +++++++++++++++++-------------
> >  1 files changed, 17 insertions(+), 13 deletions(-)

This could go to your or Randy's docs tree, right? (would be fine by 
me)

	Ingo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] doc: missing value 2 for randomize-va-space
  2009-07-03 10:24       ` Ingo Molnar
@ 2009-07-03 10:26         ` Jiri Kosina
  0 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2009-07-03 10:26 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Horst Schirmeier, rdunlap, linux-doc, linux-kernel

On Fri, 3 Jul 2009, Ingo Molnar wrote:

> > > > >      There a few legacy applications out there (such as some ancient
> > > > 
> > > > ... would you please fix this typo/grammo as well? (There a few ...)
> > > > 
> > > > >      versions of libc.so.5 from 1996) that assume that brk area starts
> > > > 
> > > > Also, the text itself doesn't seem to be super-clear ... namely, it 
> > > > describes what CONFIG_COMPAT_BRK is about, but doesn't really clarify how 
> > > > exactly does this correlate with randomize_va_space == 2. Would you mind 
> > > > also fixing this bit?
> > > 
> > > I hope I didn't misread the sources :-)  Opinions?
> > > 
> > > ---
> > > 
> > > The documentation for /proc/sys/kernel/* does not mention the possible
> > > value 2 for randomize-va-space yet.  While being there, doing some
> > > reformatting, fixing grammar problems and clarifying the correlations
> > > between randomize-va-space, kernel parameter "norandmaps" and the
> > > CONFIG_COMPAT_BRK option.
> > >                                                     
> > > Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
> > 
> > Acked-by: Jiri Kosina <jkosina@suse.cz>
> > 
> > Ingo, will you take this through your tree?
> > 
> > > 
> > > ---
> > >  Documentation/sysctl/kernel.txt |   30 +++++++++++++++++-------------
> > >  1 files changed, 17 insertions(+), 13 deletions(-)
> 
> This could go to your or Randy's docs tree, right? (would be fine by 
> me)

Sure, I basically just wanted your ACK, as you were the last one touching 
the respective code.

I will queue it, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-03 10:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02 15:23 [PATCH] doc: missing value 2 for randomize-va-space Horst Schirmeier
2009-07-02 23:11 ` Jiri Kosina
2009-07-03  0:05   ` Horst Schirmeier
2009-07-03 10:01     ` Jiri Kosina
2009-07-03 10:24       ` Ingo Molnar
2009-07-03 10:26         ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox