arm: provision page alloc debug support
Equip arm to support ARCH_SUPPORTS_DEBUG_PAGEALLOC and
enable it by default.
Having this support means all pages freed at buddy level
would be marked as read-only and would help catch any
scribbling over free page area. Allocated pages mapping
attributes is restored to read/write.
ARCH_SUPPORTS_DEBUG_PAGEALLOC needs FORCE_PAGES which
ensures all kernel mapping are populated with page
granularity and it would ensure page level accesses can
be rightly configured.
Change-Id: I9b23d1fb0b9594cc148b082c104da9a773c26057
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index cf61b80..9ce6b7f 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -62,6 +62,10 @@
8 - SIGSEGV faults
16 - SIGBUS faults
+config ARCH_SUPPORTS_DEBUG_PAGEALLOC
+ def_bool y
+ depends on FORCE_PAGES
+
config FORCE_PAGES
bool "Force lowmem to be mapped with 4K pages"
help