summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/ptdump.h
diff options
context:
space:
mode:
authorJinbum Park <jinb.park7@gmail.com>2017-12-12 03:43:57 +0300
committerRussell King <rmk+kernel@armlinux.org.uk>2018-01-21 18:32:20 +0300
commita8e53c151fe7ac52a1c13a6ace0c9e8e0f61260c (patch)
treebdd795b97c9311d45e626e5b90814afcd78567a0 /arch/arm/include/asm/ptdump.h
parentd02ca6d76ba7f089706db555ee19f3775bc42740 (diff)
downloadlinux-a8e53c151fe7ac52a1c13a6ace0c9e8e0f61260c.tar.xz
ARM: 8737/1: mm: dump: add checking for writable and executable
Page mappings with full RWX permissions are a security risk. x86, arm64 has an option to walk the page tables and dump any bad pages. (1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages")) Add a similar implementation for arm. Reviewed-by: Kees Cook <keescook@chromium.org> Tested-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Jinbum Park <jinb.park7@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/ptdump.h')
-rw-r--r--arch/arm/include/asm/ptdump.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/ptdump.h b/arch/arm/include/asm/ptdump.h
index 45d2de313eda..3ebf9718288d 100644
--- a/arch/arm/include/asm/ptdump.h
+++ b/arch/arm/include/asm/ptdump.h
@@ -30,6 +30,14 @@ static inline int ptdump_debugfs_register(struct ptdump_info *info,
}
#endif /* CONFIG_ARM_PTDUMP_DEBUGFS */
+void ptdump_check_wx(void);
+
#endif /* CONFIG_ARM_PTDUMP_CORE */
+#ifdef CONFIG_DEBUG_WX
+#define debug_checkwx() ptdump_check_wx()
+#else
+#define debug_checkwx() do { } while (0)
+#endif
+
#endif /* __ASM_PTDUMP_H */