Skip to content

Commit da2b6fb

Browse files
keesH. Peter Anvin
authored andcommitted
x86, kaslr: Clarify RANDOMIZE_BASE_MAX_OFFSET
The help text for RANDOMIZE_BASE_MAX_OFFSET was confusing. This has been clarified, and updated to be an export-only tunable. Signed-off-by: Kees Cook <keescook@chromium.org> Link: http://lkml.kernel.org/r/20131210202745.GA2961@www.outflux.net Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1 parent 1925994 commit da2b6fb

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

arch/x86/Kconfig

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,26 +1747,33 @@ config RANDOMIZE_BASE
17471747
possible. At best, due to page table layouts, 64-bit can use
17481748
9 bits of entropy and 32-bit uses 8 bits.
17491749

1750+
If unsure, say N.
1751+
17501752
config RANDOMIZE_BASE_MAX_OFFSET
1751-
hex "Maximum ASLR offset allowed"
1753+
hex "Maximum kASLR offset allowed" if EXPERT
17521754
depends on RANDOMIZE_BASE
17531755
range 0x0 0x20000000 if X86_32
17541756
default "0x20000000" if X86_32
17551757
range 0x0 0x40000000 if X86_64
17561758
default "0x40000000" if X86_64
17571759
---help---
1758-
Determines the maximal offset in bytes that will be applied to the
1759-
kernel when Address Space Layout Randomization (ASLR) is active.
1760-
Must be less than or equal to the actual physical memory on the
1761-
system. This must be a multiple of CONFIG_PHYSICAL_ALIGN.
1760+
The lesser of RANDOMIZE_BASE_MAX_OFFSET and available physical
1761+
memory is used to determine the maximal offset in bytes that will
1762+
be applied to the kernel when kernel Address Space Layout
1763+
Randomization (kASLR) is active. This must be a multiple of
1764+
PHYSICAL_ALIGN.
1765+
1766+
On 32-bit this is limited to 512MiB by page table layouts. The
1767+
default is 512MiB.
17621768

1763-
On 32-bit this is limited to 512MiB.
1769+
On 64-bit this is limited by how the kernel fixmap page table is
1770+
positioned, so this cannot be larger than 1GiB currently. Without
1771+
RANDOMIZE_BASE, there is a 512MiB to 1.5GiB split between kernel
1772+
and modules. When RANDOMIZE_BASE_MAX_OFFSET is above 512MiB, the
1773+
modules area will shrink to compensate, up to the current maximum
1774+
1GiB to 1GiB split. The default is 1GiB.
17641775

1765-
On 64-bit this is limited by how the kernel fixmap page table is
1766-
positioned, so this cannot be larger that 1GiB currently. Normally
1767-
there is a 512MiB to 1.5GiB split between kernel and modules. When
1768-
this is raised above the 512MiB default, the modules area will
1769-
shrink to compensate, up to the current maximum 1GiB to 1GiB split.
1776+
If unsure, leave at the default value.
17701777

17711778
# Relocation on x86 needs some additional build support
17721779
config X86_NEED_RELOCS

0 commit comments

Comments
 (0)