Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: fix DEBUG_SET_MODULE_RONX build dependencies

randconfig testing reveals that DEBUG_SET_MODULE_RONX needs to depend on
MMU otherwise these build errors are observed:

kernel/built-in.o: In function `set_section_ro_nx':
kernel/module.c:1738: undefined reference to `set_memory_nx'
kernel/built-in.o: In function `set_page_attributes':
kernel/module.c:1709: undefined reference to `set_memory_ro'

This is because the pageattr functions are not built for !MMU configs as
they don't have page tables.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+1 -1
+1 -1
arch/arm/Kconfig.debug
··· 1590 1590 1591 1591 config DEBUG_SET_MODULE_RONX 1592 1592 bool "Set loadable kernel module data as NX and text as RO" 1593 - depends on MODULES 1593 + depends on MODULES && MMU 1594 1594 ---help--- 1595 1595 This option helps catch unintended modifications to loadable 1596 1596 kernel module's text and read-only data. It also prevents execution