From 11d91a770f1fff44dafdf88d6089a3451f99c9b6 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Tue, 19 Aug 2014 20:41:43 +0100 Subject: arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support In a similar fashion to other architecture, add the infrastructure and Kconfig to enable DEBUG_SET_MODULE_RONX support. When enabled, module ranges will be marked read-only/no-execute as appropriate. Signed-off-by: Laura Abbott [will: fixed off-by-one in module end check] Signed-off-by: Will Deacon --- arch/arm64/Kconfig.debug | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm64/Kconfig.debug') diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug index 4ee8e90b7a45..0a12933e50ed 100644 --- a/arch/arm64/Kconfig.debug +++ b/arch/arm64/Kconfig.debug @@ -43,4 +43,15 @@ config ARM64_RANDOMIZE_TEXT_OFFSET of TEXT_OFFSET and platforms must not require a specific value. +config DEBUG_SET_MODULE_RONX + bool "Set loadable kernel module data as NX and text as RO" + depends on MODULES + help + This option helps catch unintended modifications to loadable + kernel module's text and read-only data. It also prevents execution + of module data. Such protection may interfere with run-time code + patching and dynamic kernel tracing - and they might also protect + against certain classes of kernel exploits. + If in doubt, say "N". + endmenu -- cgit v1.2.3-59-g8ed1b