Commit b7f5ab6fbbb9459a91c0acae15097a495f800206
Committed by
Jiri Kosina
1 parent
627df23c61
Exists in
master
and in
7 other branches
trivial: doc: document missing value 2 for randomize-va-space
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> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Showing 1 changed file with 17 additions and 13 deletions Side-by-side Diff
Documentation/sysctl/kernel.txt
... | ... | @@ -319,25 +319,29 @@ |
319 | 319 | space randomization that is used in the system, for architectures |
320 | 320 | that support this feature. |
321 | 321 | |
322 | -0 - Turn the process address space randomization off by default. | |
322 | +0 - Turn the process address space randomization off. This is the | |
323 | + default for architectures that do not support this feature anyways, | |
324 | + and kernels that are booted with the "norandmaps" parameter. | |
323 | 325 | |
324 | 326 | 1 - Make the addresses of mmap base, stack and VDSO page randomized. |
325 | 327 | This, among other things, implies that shared libraries will be |
326 | - loaded to random addresses. Also for PIE-linked binaries, the location | |
327 | - of code start is randomized. | |
328 | + loaded to random addresses. Also for PIE-linked binaries, the | |
329 | + location of code start is randomized. This is the default if the | |
330 | + CONFIG_COMPAT_BRK option is enabled. | |
328 | 331 | |
329 | - With heap randomization, the situation is a little bit more | |
330 | - complicated. | |
331 | - There a few legacy applications out there (such as some ancient | |
332 | +2 - Additionally enable heap randomization. This is the default if | |
333 | + CONFIG_COMPAT_BRK is disabled. | |
334 | + | |
335 | + There are a few legacy applications out there (such as some ancient | |
332 | 336 | versions of libc.so.5 from 1996) that assume that brk area starts |
333 | - just after the end of the code+bss. These applications break when | |
334 | - start of the brk area is randomized. There are however no known | |
337 | + just after the end of the code+bss. These applications break when | |
338 | + start of the brk area is randomized. There are however no known | |
335 | 339 | non-legacy applications that would be broken this way, so for most |
336 | - systems it is safe to choose full randomization. However there is | |
337 | - a CONFIG_COMPAT_BRK option for systems with ancient and/or broken | |
338 | - binaries, that makes heap non-randomized, but keeps all other | |
339 | - parts of process address space randomized if randomize_va_space | |
340 | - sysctl is turned on. | |
340 | + systems it is safe to choose full randomization. | |
341 | + | |
342 | + Systems with ancient and/or broken binaries should be configured | |
343 | + with CONFIG_COMPAT_BRK enabled, which excludes the heap from process | |
344 | + address space randomization. | |
341 | 345 | |
342 | 346 | ============================================================== |
343 | 347 |