s390: add ARCH_HAS_DEBUG_WX support
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 9 Sep 2020 15:10:29 +0000 (17:10 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 14 Sep 2020 09:38:35 +0000 (11:38 +0200)
commit08c8e685c7c9223f9c4ad6365e02bebd3f106480
tree0125da74f6c62816182837dfcae925c640fbc4a0
parent6bf9a639e76e1da8eb1ed29e037e900106e1dff4
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>
arch/s390/Kconfig
arch/s390/configs/debug_defconfig
arch/s390/configs/defconfig
arch/s390/include/asm/ptdump.h [new file with mode: 0644]
arch/s390/mm/Makefile
arch/s390/mm/dump_pagetables.c
arch/s390/mm/init.c