linux/drivers/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
..
block s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
char s390/mm: rework memcpy_real() to avoid DAT-off mode 2022-09-14 16:46:01 +02:00
cio s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
crypto s390/ap: fix crash on older machines based on QCI info missing 2022-08-15 17:19:52 +02:00
net s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
scsi s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
virtio virtio: Revert "virtio: find_vqs() add arg sizes" 2022-08-16 01:40:24 -04:00
Makefile