linux/arch/s390/boot
Vasily Gorbik e966ccf836 s390/boot: avoid mapping standby memory
Commit bb1520d581 ("s390/mm: start kernel with DAT enabled")
doesn't consider online memory holes due to potential memory offlining
and erroneously creates pgtables for stand-by memory, which bear RW+X
attribute and trigger a warning:

RANGE                                 SIZE   STATE REMOVABLE BLOCK
0x0000000000000000-0x0000000c3fffffff  49G  online       yes  0-48
0x0000000c40000000-0x0000000c7fffffff   1G offline              49
0x0000000c80000000-0x0000000fffffffff  14G  online       yes 50-63
0x0000001000000000-0x00000013ffffffff  16G offline           64-79

    s390/mm: Found insecure W+X mapping at address 0xc40000000
    WARNING: CPU: 14 PID: 1 at arch/s390/mm/dump_pagetables.c:142 note_page+0x2cc/0x2d8

Map only online memory ranges which fit within identity mapping limit.

Fixes: bb1520d581 ("s390/mm: start kernel with DAT enabled")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2023-01-31 18:56:36 +01:00
..
.gitignore s390/boot: get rid of startup archive 2022-05-06 20:45:14 +02:00
als.c s390/facilities: move stfl information from lowcore to global data 2021-06-07 17:06:58 +02:00
boot.h s390/boot: avoid mapping standby memory 2023-01-31 18:56:36 +01:00
clz_ctz.c s390/boot: get rid of startup archive 2022-05-06 20:45:14 +02:00
cmdline.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
ctype.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
decompressor.c Merge branch 'fixes' into features 2023-01-17 19:12:39 +01:00
decompressor.h s390/boot: cleanup decompressor header files 2023-01-13 14:15:04 +01:00
ebcdic.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
head_kdump.S s390/decompressor: correct some asm symbols annotations 2020-11-20 19:19:11 +01:00
head.S s390/head: get rid of 31 bit leftovers 2022-05-18 13:31:07 +02:00
install.sh kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
ipl_data.c s390/boot: convert parmarea to C 2022-05-06 20:45:15 +02:00
ipl_parm.c s390/ipl: add eckd dump support 2022-12-06 16:18:22 +01:00
ipl_report.c s390/boot: introduce boot data 'initrd_data' 2021-07-27 09:39:15 +02:00
ipl_vmparm.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
kaslr.c s390/boot: get rid of startup archive 2022-05-06 20:45:14 +02:00
machine_kexec_reloc.c s390/kernel: build a relocatable kernel 2019-04-29 10:47:10 +02:00
Makefile s390/mm: start kernel with DAT enabled 2023-01-13 14:15:05 +01:00
mem_detect.c s390/boot: get rid of startup archive 2022-05-06 20:45:14 +02:00
mem.S s390/decompressor: reuse lib/mem.S for mem functions 2018-06-25 10:14:39 +02:00
pgm_check_info.c s390: rename last_break to pgm_last_break 2021-10-26 15:21:28 +02:00
sclp_early_core.c s390/boot: move sclp early buffer from fixed address in asm to C 2021-07-27 09:39:15 +02:00
startup.c s390/boot: avoid mapping standby memory 2023-01-31 18:56:36 +01:00
string.c kasan, x86, s390: update undef CONFIG_KASAN 2020-12-22 12:55:08 -08:00
uv.c s390 updates for 5.20 merge window 2022-08-06 17:05:21 -07:00
uv.h s390/boot: cleanup adjust_to_uv_max() function 2022-07-28 18:05:23 +02:00
version.c kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
vmem.c s390/boot: avoid mapping standby memory 2023-01-31 18:56:36 +01:00
vmlinux.lds.S s390/boot: add secure boot trailer 2022-10-26 14:47:31 +02:00