Skip to contentSkip to conversation

ARM: ARM_KERNMEM_PERMS only works with MMU enabled

PATCH New Arnd Bergmann 3 participants 3 messages Jan 13, 2015 – Jan 14, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: ARM_KERNMEM_PERMS only works with MMU enabled

The recently added ARM_KERNMEM_PERMS feature works by manipulating the kernel page tables, which obviously requires an MMU. Trying to enable this feature when the MMU is disabled results in a lot of compile errors in mm/init.c, so let's add a Kconfig dependency to avoid that case.

arch/arm/mm/Kconfig +1 -0
index eaaf196fe4e1..0051cd924fb1 100644
@@ -1010,6 +1010,7 @@ config ARCH_SUPPORTS_BIG_ENDIAN
 
 config ARM_KERNMEM_PERMS
 	bool "Restrict kernel memory permissions"
+	depends on MMU
 	help
 	  If this is set, kernel memory other than kernel text (and rodata)
 	  will be made non-executable. The tradeoff is that each region is
#1 lore raw

PATCH 1/1 ARM: ARM_KERNMEM_PERMS only works with MMU enabled

Quoted 7 lines · Arnd Bergmann

The recently added ARM_KERNMEM_PERMS feature works by manipulating the kernel page tables, which obviously requires an MMU. Trying to enable this feature when the MMU is disabled results in a lot of compile errors in mm/init.c, so let's add a Kconfig dependency to avoid that case.

Yeah, good call.

Thanks!

-Kees

Quoted 14 lines
arch/arm/mm/Kconfig +1 -0
index eaaf196fe4e1..0051cd924fb1 100644
@@ -1010,6 +1010,7 @@ config ARCH_SUPPORTS_BIG_ENDIAN
 
 config ARM_KERNMEM_PERMS
        bool "Restrict kernel memory permissions"
+       depends on MMU
        help
          If this is set, kernel memory other than kernel text (and rodata)
          will be made non-executable. The tradeoff is that each region is
Signature · 2 lines
Kees Cook
Chrome OS Security
#2 lore raw

PATCH 1/1 ARM: ARM_KERNMEM_PERMS only works with MMU enabled

In reply to Arnd Bergmann
Quoted 15 lines · Arnd Bergmann

The recently added ARM_KERNMEM_PERMS feature works by manipulating the kernel page tables, which obviously requires an MMU. Trying to enable this feature when the MMU is disabled results in a lot of compile errors in mm/init.c, so let's add a Kconfig dependency to avoid that case.

arch/arm/mm/Kconfig +0 -0
index eaaf196fe4e1..0051cd924fb1 100644

arch/arm/mm/Kconfig config ARCH_SUPPORTS_BIG_ENDIAN · line 1016

Quoted 7 lines
arch/arm/mm/Kconfig +1 -0
@@ -1010,6 +1010,7 @@ config ARCH_SUPPORTS_BIG_ENDIAN
 
  config ARM_KERNMEM_PERMS
  	bool "Restrict kernel memory permissions"
+	depends on MMU
  	help
  	  If this is set, kernel memory other than kernel text (and rodata)
  	  will be made non-executable. The tradeoff is that each region is
Signature · 3 lines
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project