linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: ARM_KERNMEM_PERMS only works with MMU enabled
@ 2015-01-13 14:14 Arnd Bergmann
  2015-01-13 14:41 ` Kees Cook
  2015-01-14 23:04 ` Laura Abbott
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2015-01-13 14:14 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index eaaf196fe4e1..0051cd924fb1 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: ARM_KERNMEM_PERMS only works with MMU enabled
  2015-01-13 14:14 [PATCH] ARM: ARM_KERNMEM_PERMS only works with MMU enabled Arnd Bergmann
@ 2015-01-13 14:41 ` Kees Cook
  2015-01-14 23:04 ` Laura Abbott
  1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2015-01-13 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 13, 2015 at 6:14 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Yeah, good call.

Acked-by: Kees Cook <keescook@chromium.org>

Thanks!

-Kees

>
> diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
> index eaaf196fe4e1..0051cd924fb1 100644
> --- a/arch/arm/mm/Kconfig
> +++ b/arch/arm/mm/Kconfig
> @@ -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
>



-- 
Kees Cook
Chrome OS Security

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: ARM_KERNMEM_PERMS only works with MMU enabled
  2015-01-13 14:14 [PATCH] ARM: ARM_KERNMEM_PERMS only works with MMU enabled Arnd Bergmann
  2015-01-13 14:41 ` Kees Cook
@ 2015-01-14 23:04 ` Laura Abbott
  1 sibling, 0 replies; 3+ messages in thread
From: Laura Abbott @ 2015-01-14 23:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 1/13/2015 6:14 AM, Arnd Bergmann wrote:
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
> index eaaf196fe4e1..0051cd924fb1 100644
> --- a/arch/arm/mm/Kconfig
> +++ b/arch/arm/mm/Kconfig
> @@ -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
>
>

Acked-by: Laura Abbott <lauraa@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-14 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 14:14 [PATCH] ARM: ARM_KERNMEM_PERMS only works with MMU enabled Arnd Bergmann
2015-01-13 14:41 ` Kees Cook
2015-01-14 23:04 ` Laura Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).