public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: mm: DEBUG_RODATA makes no sense with XIP_KERNEL
@ 2016-02-16 16:03 Arnd Bergmann
  2016-02-16 16:03 ` [PATCH 2/2] ARM: mm: hide __start_rodata_section_aligned for non-debug builds Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-02-16 16:03 UTC (permalink / raw)
  To: linux-arm-kernel

When CONFIG_DEBUG_ALIGN_RODATA is set, we get a link error:

arch/arm/mm/built-in.o:(.data+0x4bc): undefined reference to `__start_rodata_section_aligned'

However, this combination is useless, as XIP_KERNEL implies that all the
RODATA is already marked readonly, so both CONFIG_DEBUG_RODATA and
CONFIG_DEBUG_ALIGN_RODATA (which depends on the other) are not
needed with XIP_KERNEL, and this patches enforces that using a Kconfig
dependency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 25362dc496ed ("ARM: 8501/1: mm: flip priority of CONFIG_DEBUG_RODATA")
---
 arch/arm/mm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index fbf2296388ce..8894045caba9 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -1039,7 +1039,7 @@ config ARCH_SUPPORTS_BIG_ENDIAN
 
 config DEBUG_RODATA
 	bool "Make kernel text and rodata read-only"
-	depends on MMU
+	depends on MMU && !XIP_KERNEL
 	default y if CPU_V7
 	help
 	  If this is set, kernel text and rodata memory will be made
-- 
2.7.0

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

end of thread, other threads:[~2016-02-16 23:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16 16:03 [PATCH 1/2] ARM: mm: DEBUG_RODATA makes no sense with XIP_KERNEL Arnd Bergmann
2016-02-16 16:03 ` [PATCH 2/2] ARM: mm: hide __start_rodata_section_aligned for non-debug builds Arnd Bergmann
2016-02-16 16:12   ` Ard Biesheuvel
2016-02-16 16:34     ` Arnd Bergmann
2016-02-16 16:36       ` Ard Biesheuvel
2016-02-16 16:05 ` [PATCH 1/2] ARM: mm: DEBUG_RODATA makes no sense with XIP_KERNEL Ard Biesheuvel
2016-02-16 18:41 ` Kees Cook
2016-02-16 20:31 ` Kees Cook
2016-02-16 23:12   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox