summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2017-05-12 08:47:47 -0700
committerStephen Boyd <sboyd@codeaurora.org>2017-05-12 08:47:47 -0700
commitc3ed5ae37c61a68ef813885126fe09529792b6c5 (patch)
tree82528d658e980d4f6fd3930fe91ce1d1dbd78cf0
parentc4a48b7ed2e4287ffd953a152564e2554bc3a26b (diff)
ARM64: Make KERNEL_TEXT_RDONLY depend on !DEBUG_RODATA
KERNEL_TEXT_RDONLY is similar to DEBUG_RODATA, but it relies on 4k pages to be made, whereas DEBUG_RODATA can work with or without 4k pages. Let's move the depends on statement from FORCE_PAGES to KERNEL_TEXT_RDONLY to accurately reflect the real dependency here. This fixes a warning where we have FORCE_PAGES enabled but DEBUG_RODATA is also enabled at the same time because the latter is "default y" now and the depends on for FORCE_PAGES can't be satisfied. In fact, it's OK for FORCE_PAGES to be enabled at the same time as DEBUG_RODATA, it's really there to prevent KERNEL_TEXT_RDONLY being enabled at the same time as DEBUG_RODATA. Move the depends on to make things clearer. Change-Id: Ie73b768ed4540cdb4d752a9b5f1a049bf644bc7e Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--arch/arm64/Kconfig.debug2
-rw-r--r--arch/arm64/configs/msm-auto_defconfig1
-rw-r--r--arch/arm64/configs/msm_defconfig1
3 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
index 2b9a966791d8..441005f88761 100644
--- a/arch/arm64/Kconfig.debug
+++ b/arch/arm64/Kconfig.debug
@@ -87,7 +87,6 @@ config DEBUG_ALIGN_RODATA
config FORCE_PAGES
bool "Force lowmem to be mapped with 4K pages"
- depends on !DEBUG_RODATA
help
There are some advanced debug features that can only be done when
memory is mapped with pages instead of sections. Enable this option
@@ -112,6 +111,7 @@ config FREE_PAGES_RDONLY
config KERNEL_TEXT_RDONLY
bool "Set kernel text section pages as read only"
depends on FREE_PAGES_RDONLY
+ depends on !DEBUG_RODATA
help
The kernel text pages are always mapped in the kernel.
This means that anyone can write to the page if they have
diff --git a/arch/arm64/configs/msm-auto_defconfig b/arch/arm64/configs/msm-auto_defconfig
index e3fbb5166478..1981b97309a2 100644
--- a/arch/arm64/configs/msm-auto_defconfig
+++ b/arch/arm64/configs/msm-auto_defconfig
@@ -638,7 +638,6 @@ CONFIG_PANIC_ON_DATA_CORRUPTION=y
CONFIG_ARM64_PTDUMP=y
CONFIG_DEBUG_SET_MODULE_RONX=y
CONFIG_FREE_PAGES_RDONLY=y
-CONFIG_KERNEL_TEXT_RDONLY=y
CONFIG_CORESIGHT=y
CONFIG_CORESIGHT_EVENT=y
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
diff --git a/arch/arm64/configs/msm_defconfig b/arch/arm64/configs/msm_defconfig
index 80e737e5726c..5c4b307b1887 100644
--- a/arch/arm64/configs/msm_defconfig
+++ b/arch/arm64/configs/msm_defconfig
@@ -622,7 +622,6 @@ CONFIG_PANIC_ON_DATA_CORRUPTION=y
CONFIG_ARM64_PTDUMP=y
CONFIG_DEBUG_SET_MODULE_RONX=y
CONFIG_FREE_PAGES_RDONLY=y
-CONFIG_KERNEL_TEXT_RDONLY=y
CONFIG_PFK=y
CONFIG_SECURITY=y
CONFIG_SECURITY_SELINUX=y