]> git.baikalelectronics.ru Git - kernel.git/commit
s390/maccess: fix semantics of memcpy_real() and its callers
authorAlexander Gordeev <agordeev@linux.ibm.com>
Sat, 29 Jan 2022 08:24:50 +0000 (09:24 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 9 Feb 2022 21:56:04 +0000 (22:56 +0100)
commit7c0eeaf4382cc5179dc06a4a9f4db751aa3fba50
treee93519a8541e4300b55f52a3c320beac2f7214a6
parent9621f47e7563189fd01f23afdeb94578a85ee82f
s390/maccess: fix semantics of memcpy_real() and its callers

There is a confusion with regard to the source address of
memcpy_real() and calling functions. While the declared
type for a source assumes a virtual address, in fact it
always called with physical address of the source.

This confusion led to bugs in copy_oldmem_kernel() and
copy_oldmem_user() functions, where __pa() macro applied
mistakenly to physical addresses. It does not lead to a
real issue, since virtual and physical addresses are
currently the same.

Fix both the bugs and memcpy_real() prototype by making
type of source address consistent to the function name
and the way it actually used.

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>
arch/s390/include/asm/os_info.h
arch/s390/include/asm/processor.h
arch/s390/include/asm/uaccess.h
arch/s390/kernel/crash_dump.c
arch/s390/kernel/os_info.c
arch/s390/kernel/smp.c
arch/s390/mm/maccess.c
drivers/s390/char/zcore.c