diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-10-20 11:26:33 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-10-20 11:26:33 -0700 |
commit | 09147a74376428080eddfed0cbce2cab205c2508 (patch) | |
tree | 7c903b82831eb03498dfc89c615e2acd5e1d9d6f /arch/arm/mm/Kconfig | |
parent | e4bec9707eb7446e0cd1961f91e6948819327933 (diff) | |
parent | c2fab09b2ec32f252029757ba3353ea3d308c811 (diff) |
Merge branch 'test/linux-linaro-lsk-v3.18-android' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-v3.18-androidlsk-v3.18-15.10-android
Diffstat (limited to 'arch/arm/mm/Kconfig')
-rw-r--r-- | arch/arm/mm/Kconfig | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 7eb94e6fc376..bc219b303bc7 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -1009,3 +1009,24 @@ config ARCH_SUPPORTS_BIG_ENDIAN help This option specifies the architecture can support big endian operation. + +config ARM_KERNMEM_PERMS + bool "Restrict kernel memory permissions" + 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 + padded to section-size (1MiB) boundaries (because their permissions + are different and splitting the 1M pages into 4K ones causes TLB + performance problems), wasting memory. + +config DEBUG_RODATA + bool "Make kernel text and rodata read-only" + depends on ARM_KERNMEM_PERMS + default y + help + If this is set, kernel text and rodata will be made read-only. This + is to help catch accidental or malicious attempts to change the + kernel's executable code. Additionally splits rodata from kernel + text so it can be made explicitly non-executable. This creates + another section-size padded region, so it can waste more memory + space while gaining the read-only protections. |