* [PATCH -next] x86, kaslr: clarify RANDOMIZE_BASE_MAX_OFFSET
@ 2013-12-10 20:27 Kees Cook
2013-12-11 11:02 ` Ingo Molnar
2014-01-14 18:48 ` [tip:x86/kaslr] x86, kaslr: Clarify RANDOMIZE_BASE_MAX_OFFSET tip-bot for Kees Cook
0 siblings, 2 replies; 3+ messages in thread
From: Kees Cook @ 2013-12-10 20:27 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, x86
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>
---
arch/x86/Kconfig | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a5c83b9dad45..e5fd1e67fd73 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1752,26 +1752,33 @@ config RANDOMIZE_BASE
possible. At best, due to page table layouts, 64-bit can use
9 bits of entropy and 32-bit uses 8 bits.
+ If unsure, say N.
+
config RANDOMIZE_BASE_MAX_OFFSET
- hex "Maximum ASLR offset allowed"
+ hex "Maximum kASLR offset allowed" if EXPERT
depends on RANDOMIZE_BASE
range 0x0 0x20000000 if X86_32
default "0x20000000" if X86_32
range 0x0 0x40000000 if X86_64
default "0x40000000" if X86_64
---help---
- Determines the maximal offset in bytes that will be applied to the
- kernel when Address Space Layout Randomization (ASLR) is active.
- Must be less than or equal to the actual physical memory on the
- system. This must be a multiple of CONFIG_PHYSICAL_ALIGN.
+ The lesser of RANDOMIZE_BASE_MAX_OFFSET and available physical
+ memory is used to determine the maximal offset in bytes that will
+ be applied to the kernel when kernel Address Space Layout
+ Randomization (kASLR) is active. This must be a multiple of
+ PHYSICAL_ALIGN.
+
+ On 32-bit this is limited to 512MiB by page table layouts. The
+ default is 512MiB.
- On 32-bit this is limited to 512MiB.
+ On 64-bit this is limited by how the kernel fixmap page table is
+ positioned, so this cannot be larger than 1GiB currently. Without
+ RANDOMIZE_BASE, there is a 512MiB to 1.5GiB split between kernel
+ and modules. When RANDOMIZE_BASE_MAX_OFFSET is above 512MiB, the
+ modules area will shrink to compensate, up to the current maximum
+ 1GiB to 1GiB split. The default is 1GiB.
- On 64-bit this is limited by how the kernel fixmap page table is
- positioned, so this cannot be larger that 1GiB currently. Normally
- there is a 512MiB to 1.5GiB split between kernel and modules. When
- this is raised above the 512MiB default, the modules area will
- shrink to compensate, up to the current maximum 1GiB to 1GiB split.
+ If unsure, leave at the default value.
# Relocation on x86 needs some additional build support
config X86_NEED_RELOCS
--
1.7.9.5
--
Kees Cook
Chrome OS Security
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] x86, kaslr: clarify RANDOMIZE_BASE_MAX_OFFSET
2013-12-10 20:27 [PATCH -next] x86, kaslr: clarify RANDOMIZE_BASE_MAX_OFFSET Kees Cook
@ 2013-12-11 11:02 ` Ingo Molnar
2014-01-14 18:48 ` [tip:x86/kaslr] x86, kaslr: Clarify RANDOMIZE_BASE_MAX_OFFSET tip-bot for Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2013-12-11 11:02 UTC (permalink / raw)
To: Kees Cook; +Cc: Ingo Molnar, linux-kernel, H. Peter Anvin, Thomas Gleixner, x86
* Kees Cook <keescook@chromium.org> wrote:
> 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>
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:x86/kaslr] x86, kaslr: Clarify RANDOMIZE_BASE_MAX_OFFSET
2013-12-10 20:27 [PATCH -next] x86, kaslr: clarify RANDOMIZE_BASE_MAX_OFFSET Kees Cook
2013-12-11 11:02 ` Ingo Molnar
@ 2014-01-14 18:48 ` tip-bot for Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Kees Cook @ 2014-01-14 18:48 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, keescook, tglx, hpa
Commit-ID: da2b6fb990cf782b18952f534ec7323453bc4fc9
Gitweb: http://git.kernel.org/tip/da2b6fb990cf782b18952f534ec7323453bc4fc9
Author: Kees Cook <keescook@chromium.org>
AuthorDate: Tue, 10 Dec 2013 12:27:45 -0800
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 14 Jan 2014 10:45:56 -0800
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>
---
arch/x86/Kconfig | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 596cd9e..5c9e19d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1747,26 +1747,33 @@ config RANDOMIZE_BASE
possible. At best, due to page table layouts, 64-bit can use
9 bits of entropy and 32-bit uses 8 bits.
+ If unsure, say N.
+
config RANDOMIZE_BASE_MAX_OFFSET
- hex "Maximum ASLR offset allowed"
+ hex "Maximum kASLR offset allowed" if EXPERT
depends on RANDOMIZE_BASE
range 0x0 0x20000000 if X86_32
default "0x20000000" if X86_32
range 0x0 0x40000000 if X86_64
default "0x40000000" if X86_64
---help---
- Determines the maximal offset in bytes that will be applied to the
- kernel when Address Space Layout Randomization (ASLR) is active.
- Must be less than or equal to the actual physical memory on the
- system. This must be a multiple of CONFIG_PHYSICAL_ALIGN.
+ The lesser of RANDOMIZE_BASE_MAX_OFFSET and available physical
+ memory is used to determine the maximal offset in bytes that will
+ be applied to the kernel when kernel Address Space Layout
+ Randomization (kASLR) is active. This must be a multiple of
+ PHYSICAL_ALIGN.
+
+ On 32-bit this is limited to 512MiB by page table layouts. The
+ default is 512MiB.
- On 32-bit this is limited to 512MiB.
+ On 64-bit this is limited by how the kernel fixmap page table is
+ positioned, so this cannot be larger than 1GiB currently. Without
+ RANDOMIZE_BASE, there is a 512MiB to 1.5GiB split between kernel
+ and modules. When RANDOMIZE_BASE_MAX_OFFSET is above 512MiB, the
+ modules area will shrink to compensate, up to the current maximum
+ 1GiB to 1GiB split. The default is 1GiB.
- On 64-bit this is limited by how the kernel fixmap page table is
- positioned, so this cannot be larger that 1GiB currently. Normally
- there is a 512MiB to 1.5GiB split between kernel and modules. When
- this is raised above the 512MiB default, the modules area will
- shrink to compensate, up to the current maximum 1GiB to 1GiB split.
+ If unsure, leave at the default value.
# Relocation on x86 needs some additional build support
config X86_NEED_RELOCS
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-14 18:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 20:27 [PATCH -next] x86, kaslr: clarify RANDOMIZE_BASE_MAX_OFFSET Kees Cook
2013-12-11 11:02 ` Ingo Molnar
2014-01-14 18:48 ` [tip:x86/kaslr] x86, kaslr: Clarify RANDOMIZE_BASE_MAX_OFFSET tip-bot for Kees Cook
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.