doc: missing value 2 for randomize-va-space
PATCH 1/1 doc: missing value 2 for randomize-va-space
The documentation for /proc/sys/kernel/* does not mention the possible value 2 for randomize-va-space (but already mentions what it does).
--- Documentation/sysctl/kernel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/sysctl/kernel.txt +1 -1
@@ -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
Signature · 1 line
PGP-Key 0xD40E0E7A
Quoted 2 lines · Horst Schirmeier
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 ...
Quoted 8 lines
Documentation/sysctl/kernel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/sysctl/kernel.txt +0
-0
Documentation/sysctl/kernel.txt that support this feature. · line 315
Quoted 7 lines
Documentation/sysctl/kernel.txt +1
-1@@ -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 ...)
Documentation/sysctl/kernel.txt that support this feature. · line 316
Quoted 1 line
Documentation/sysctl/kernel.txt +0
-0versions 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,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 10 lines · Jiri Kosina
Quoted 1 line
There a few legacy applications out there (such as some ancient
... would you please fix this typo/grammo as well? (There a few ...)
Quoted 1 line
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_BRKis about, but doesn't really clarify how exactly does this correlate withrandomize_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.
--- Documentation/sysctl/kernel.txt | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-)
Documentation/sysctl/kernel.txt +17 -13
@@ -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. ==============================================================
Signature · 1 line
PGP-Key 0xD40E0E7A
Jiri Kosina
Acked-by[ added Ingo to CC ]
Quoted 16 lines · Horst Schirmeier
Quoted 10 lines · Jiri Kosina
Quoted 1 line
There a few legacy applications out there (such as some ancient
... would you please fix this typo/grammo as well? (There a few ...)
Quoted 1 line
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_BRKis about, but doesn't really clarify how exactly does this correlate withrandomize_va_space== 2. Would you mind also fixing this bit?I hope I didn't misread the sources :-) Opinions?
---
Quoted 7 lines
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 theCONFIG_COMPAT_BRKoption.Signed-off-by Horst Schirmeier <[email protected]>
Ingo, will you take this through your tree?
Quoted 56 lines
--- Documentation/sysctl/kernel.txt | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-)Documentation/sysctl/kernel.txt +17
-13@@ -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. ==============================================================Signature · 2 lines
-- PGP-Key 0xD40E0E7A
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 27 lines · Jiri Kosina
[ added Ingo to CC ]
Quoted 22 lines · Horst Schirmeier
Quoted 10 lines · Jiri Kosina
Quoted 1 line
There a few legacy applications out there (such as some ancient
... would you please fix this typo/grammo as well? (There a few ...)
Quoted 1 line
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_BRKis about, but doesn't really clarify how exactly does this correlate withrandomize_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 theCONFIG_COMPAT_BRKoption.
Quoted 10 lines
Quoted 1 line
Signed-off-by Horst Schirmeier <[email protected]>Acked-by Jiri Kosina <[email protected]>Ingo, will you take this through your tree?
Quoted 4 lines
--- 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
Quoted 28 lines · Ingo Molnar
Quoted 28 lines
Quoted 15 lines
Quoted 10 lines
Quoted 1 line
There a few legacy applications out there (such as some ancient
... would you please fix this typo/grammo as well? (There a few ...)
Quoted 1 line
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_BRKis about, but doesn't really clarify how exactly does this correlate withrandomize_va_space== 2. Would you mind also fixing this bit?I hope I didn't misread the sources :-) Opinions?
---
Quoted 7 lines
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 theCONFIG_COMPAT_BRKoption.Signed-off-by Horst Schirmeier <[email protected]>Acked-by Jiri Kosina <[email protected]>Ingo, will you take this through your tree?
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
--- 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.
Signature · 2 lines
Jiri Kosina SUSE Labs