linux/arch/s390
Alexander Gordeev 2f0e8aae26 s390/mm: rework memcpy_real() to avoid DAT-off mode
Function memcpy_real() is an univeral data mover that does not
require DAT mode to be able reading from a physical address.
Its advantage is an ability to read from any address, even
those for which no kernel virtual mapping exists.

Although memcpy_real() is interrupt-safe, there are no handlers
that make use of this function. The compiler instrumentation
have to be disabled and separate no-DAT stack used to allow
execution of the function once DAT mode is disabled.

Rework memcpy_real() to overcome these shortcomings. As result,
data copying (which is primarily reading out a crashed system
memory by a user process) is executed on a regular stack with
enabled interrupts. Also, use of memcpy_real_buf swap buffer
becomes unnecessary and the swapping is eliminated.

The above is achieved by using a fixed virtual address range
that spans a single page and remaps that page repeatedly when
memcpy_real() is called for a particular physical address.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2022-09-14 16:46:01 +02:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390/mm: rework memcpy_real() to avoid DAT-off mode 2022-09-14 16:46:01 +02:00
configs s390: update defconfigs 2022-08-30 21:57:07 +02:00
crypto s390 updates for 5.20 merge window 2022-08-06 17:05:21 -07:00
hypfs s390/hypfs: avoid error message under KVM 2022-08-15 17:19:51 +02:00
include s390/mm: rework memcpy_real() to avoid DAT-off mode 2022-09-14 16:46:01 +02:00
kernel s390/mm: rework memcpy_real() to avoid DAT-off mode 2022-09-14 16:46:01 +02:00
kvm KVM: s390: resetting the Topology-Change-Report 2022-07-20 10:57:37 +02:00
lib s390/delay: sync comment within __delay() with reality 2022-08-30 22:00:33 +02:00
mm s390/mm: rework memcpy_real() to avoid DAT-off mode 2022-09-14 16:46:01 +02:00
net s390/bpf: Fix typo in comment 2022-05-23 11:25:53 -07:00
pci s390/pci: convert high_memory to physical address 2022-09-14 16:46:00 +02:00
purgatory s390/purgatory: remove duplicated build rule of kexec-purgatory.o 2022-06-30 14:18:16 +02:00
tools KVM: s390: Add facility 197 to the allow list 2022-07-13 15:25:25 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig Random number generator updates for Linux 6.0-rc1. 2022-08-02 17:31:35 -07:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390/nospec: remove unneeded header includes 2022-07-13 15:21:55 +02:00