summaryrefslogtreecommitdiff
path: root/arch/s390/mm/init.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2020-09-09 18:10:29 +0300
committerVasily Gorbik <gor@linux.ibm.com>2020-09-14 12:38:35 +0300
commit08c8e685c7c9223f9c4ad6365e02bebd3f106480 (patch)
tree0125da74f6c62816182837dfcae925c640fbc4a0 /arch/s390/mm/init.c
parent6bf9a639e76e1da8eb1ed29e037e900106e1dff4 (diff)
downloadlinux-08c8e685c7c9223f9c4ad6365e02bebd3f106480.tar.xz
s390: add ARCH_HAS_DEBUG_WX support
Checks the whole kernel address space for W+X mappings. Note that currently the first lowcore page unfortunately has to be mapped W+X. Therefore this not reported as an insecure mapping. For the very same reason the wording is also different to other architectures if the test passes: On s390 it is "no unexpected W+X pages found" instead of "no W+X pages found". Tested-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/mm/init.c')
-rw-r--r--arch/s390/mm/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 0d282081dc1f..d3ddb4361361 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -34,6 +34,7 @@
#include <asm/processor.h>
#include <linux/uaccess.h>
#include <asm/pgalloc.h>
+#include <asm/ptdump.h>
#include <asm/dma.h>
#include <asm/lowcore.h>
#include <asm/tlb.h>
@@ -129,6 +130,7 @@ void mark_rodata_ro(void)
set_memory_ro((unsigned long)__start_ro_after_init, size >> PAGE_SHIFT);
pr_info("Write protected read-only-after-init data: %luk\n", size >> 10);
+ debug_checkwx();
}
int set_memory_encrypted(unsigned long addr, int numpages)