]> git.baikalelectronics.ru Git - kernel.git/commit
s390/crash: use static swap buffer for copy_to_user_real()
authorAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 19 Jul 2022 05:16:35 +0000 (07:16 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 20 Jul 2022 15:21:41 +0000 (17:21 +0200)
commitaa9d90e4096fbdfb650c832b3bc74762131c7802
treeedbdcca483dc5378818aa1a20582fa7a1b4c9927
parentcdf2cf4a00f9ad0b50a0f2ce26bc1dfe6217d8a1
s390/crash: use static swap buffer for copy_to_user_real()

Currently a temporary page-size buffer is allocated for copying
oldmem to user space. That limits copy_to_user_real() operation
only to stages when virtual memory is available and still makes
it possible to fail while the system is being dumped.

Instead of reallocating single page on each copy_oldmem_page()
iteration use a statically allocated buffer.

This also paves the way for a further memcpy_real() rework where
no swap buffer is needed altogether.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Tested-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Link: https://lore.kernel.org/r/334ed359680c4d45dd32feb104909f610312ef0f.1658206891.git.agordeev@linux.ibm.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/crash_dump.c