kernel: enable CONFIG_RANDOMIZE_MEMORY on i586 aarch64 and, armv5tel

Message ID 51cf736d-3c60-0eeb-90e3-90d498f39789@ipfire.org
State Dropped
Headers
Series kernel: enable CONFIG_RANDOMIZE_MEMORY on i586 aarch64 and, armv5tel |

Commit Message

Peter Müller June 9, 2020, 5:15 p.m. UTC
  Fixes: #12364

Cc: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 config/kernel/kernel.config.aarch64-ipfire        | 2 ++
 config/kernel/kernel.config.armv5tel-ipfire-multi | 2 ++
 config/kernel/kernel.config.i586-ipfire           | 2 ++
 3 files changed, 6 insertions(+)
  

Comments

Arne Fitzenreiter June 10, 2020, 2:33 p.m. UTC | #1
This patch will not work. You cannot simply add an Option.
The next make will remove it because it is not supported!

RAMDOMZE_MEMORY is not supported if there is no
# CONFIG_RANDOMIZE_MEMORY is not set
that you can change to "Y"

Arne



Am 2020-06-09 19:15, schrieb Peter Müller:
> Fixes: #12364
> 
> Cc: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
> Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
> ---
>  config/kernel/kernel.config.aarch64-ipfire        | 2 ++
>  config/kernel/kernel.config.armv5tel-ipfire-multi | 2 ++
>  config/kernel/kernel.config.i586-ipfire           | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/config/kernel/kernel.config.aarch64-ipfire
> b/config/kernel/kernel.config.aarch64-ipfire
> index e0f2f6df8..b3c397a3c 100644
> --- a/config/kernel/kernel.config.aarch64-ipfire
> +++ b/config/kernel/kernel.config.aarch64-ipfire
> @@ -519,6 +519,8 @@ CONFIG_ARM64_VA_BITS=39
>  CONFIG_SCHED_MC=y
>  CONFIG_SCHED_SMT=y
>  CONFIG_NR_CPUS=8
> +CONFIG_RANDOMIZE_MEMORY=y
> +CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
>  CONFIG_HOTPLUG_CPU=y
>  # CONFIG_NUMA is not set
>  CONFIG_HOLES_IN_ZONE=y
> diff --git a/config/kernel/kernel.config.armv5tel-ipfire-multi
> b/config/kernel/kernel.config.armv5tel-ipfire-multi
> index 15183300f..a314baa73 100644
> --- a/config/kernel/kernel.config.armv5tel-ipfire-multi
> +++ b/config/kernel/kernel.config.armv5tel-ipfire-multi
> @@ -776,6 +776,8 @@ CONFIG_VMSPLIT_3G=y
>  # CONFIG_VMSPLIT_1G is not set
>  CONFIG_PAGE_OFFSET=0xC0000000
>  CONFIG_NR_CPUS=8
> +CONFIG_RANDOMIZE_MEMORY=y
> +CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
>  CONFIG_HOTPLUG_CPU=y
>  CONFIG_ARM_PSCI=y
>  CONFIG_ARCH_NR_GPIO=512
> diff --git a/config/kernel/kernel.config.i586-ipfire
> b/config/kernel/kernel.config.i586-ipfire
> index 578931497..a86a76c05 100644
> --- a/config/kernel/kernel.config.i586-ipfire
> +++ b/config/kernel/kernel.config.i586-ipfire
> @@ -628,6 +628,8 @@ CONFIG_RELOCATABLE=y
>  CONFIG_RANDOMIZE_BASE=y
>  CONFIG_X86_NEED_RELOCS=y
>  CONFIG_PHYSICAL_ALIGN=0x400000
> +CONFIG_RANDOMIZE_MEMORY=y
> +CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
>  CONFIG_HOTPLUG_CPU=y
>  # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
>  # CONFIG_DEBUG_HOTPLUG_CPU0 is not set
  

Patch

diff --git a/config/kernel/kernel.config.aarch64-ipfire b/config/kernel/kernel.config.aarch64-ipfire
index e0f2f6df8..b3c397a3c 100644
--- a/config/kernel/kernel.config.aarch64-ipfire
+++ b/config/kernel/kernel.config.aarch64-ipfire
@@ -519,6 +519,8 @@  CONFIG_ARM64_VA_BITS=39
 CONFIG_SCHED_MC=y
 CONFIG_SCHED_SMT=y
 CONFIG_NR_CPUS=8
+CONFIG_RANDOMIZE_MEMORY=y
+CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_NUMA is not set
 CONFIG_HOLES_IN_ZONE=y
diff --git a/config/kernel/kernel.config.armv5tel-ipfire-multi b/config/kernel/kernel.config.armv5tel-ipfire-multi
index 15183300f..a314baa73 100644
--- a/config/kernel/kernel.config.armv5tel-ipfire-multi
+++ b/config/kernel/kernel.config.armv5tel-ipfire-multi
@@ -776,6 +776,8 @@  CONFIG_VMSPLIT_3G=y
 # CONFIG_VMSPLIT_1G is not set
 CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_NR_CPUS=8
+CONFIG_RANDOMIZE_MEMORY=y
+CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
 CONFIG_HOTPLUG_CPU=y
 CONFIG_ARM_PSCI=y
 CONFIG_ARCH_NR_GPIO=512
diff --git a/config/kernel/kernel.config.i586-ipfire b/config/kernel/kernel.config.i586-ipfire
index 578931497..a86a76c05 100644
--- a/config/kernel/kernel.config.i586-ipfire
+++ b/config/kernel/kernel.config.i586-ipfire
@@ -628,6 +628,8 @@  CONFIG_RELOCATABLE=y
 CONFIG_RANDOMIZE_BASE=y
 CONFIG_X86_NEED_RELOCS=y
 CONFIG_PHYSICAL_ALIGN=0x400000
+CONFIG_RANDOMIZE_MEMORY=y
+CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
 # CONFIG_DEBUG_HOTPLUG_CPU0 is not set