linux-brain/arch/s390/boot
Heiko Carstens 5f5c1e6833 s390/mem_detect: fix tprot() program check new psw handling
[ Upstream commit da9057576785aaab52e706e76c0475c85b77ec14 ]

The tprot() inline asm temporarily changes the program check new psw
to redirect a potential program check on the diag instruction.
Restoring of the program check new psw is done in C code behind the
inline asm.

This can be problematic, especially if the function is inlined, since
the compiler can reorder instructions in such a way that a different
instruction, which may result in a program check, might be executed
before the program check new psw has been restored.

To avoid such a scenario move restoring into the inline asm. For
consistency reasons move also saving of the original program check new
psw into the inline asm.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:10:45 +02:00
..
compressed s390/startup: adjust _sdma and _edma to page boundaries 2019-08-21 12:58:53 +02:00
.gitignore s390: introduce .boot.data section compile time validation 2018-10-09 11:21:08 +02:00
Makefile s390: make 'install' not depend on vmlinux 2020-03-12 13:00:13 +01:00
als.c s390: simplify disabled_wait 2019-05-02 13:54:11 +02:00
boot.h s390 updates for the 5.4 merge window 2019-09-17 14:04:43 -07: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
ebcdic.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
head.S s390/startup: avoid save_area_sync overflow 2020-11-05 11:43:14 +01:00
head_kdump.S s390/boot: make head.S and als.c be part of the decompressor only 2018-06-25 10:14:38 +02:00
install.sh s390: Remove redundant license text 2017-11-24 15:37:24 +01:00
ipl_parm.c s390/ipl_parm: fix program check new psw handling 2021-07-20 16:10:44 +02:00
ipl_report.c s390/ipl: read IPL report at early boot 2019-04-26 12:34:05 +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/kaslr: Fix casts in get_random 2020-02-28 17:22:28 +01:00
machine_kexec_reloc.c s390/kernel: build a relocatable kernel 2019-04-29 10:47:10 +02:00
mem.S s390/decompressor: reuse lib/mem.S for mem functions 2018-06-25 10:14:39 +02:00
mem_detect.c s390/mem_detect: fix tprot() program check new psw handling 2021-07-20 16:10:45 +02:00
pgm_check_info.c s390/startup: add pgm check info printing 2019-09-13 12:17:37 +02:00
sclp_early_core.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
startup.c s390/kaslr: store KASLR offset for early dumps 2019-12-17 19:56:51 +01:00
string.c s390/kasan: improve string/memory functions checks 2019-01-18 09:34:18 +01:00
text_dma.S s390: use proper expoline sections for .dma code 2019-05-02 13:54:11 +02:00
uv.c s390/uv: Fix handling of length extensions 2020-02-19 19:53:04 +01:00
version.c s390: enable detection of kernel version from bzImage 2019-07-23 10:43:50 +02:00