diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-01-29 08:38:56 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-02-09 22:56:03 +0100 |
commit | dc306186a130c6d9feb0aabc1c71b8ed1674a3bf (patch) | |
tree | 463c9754d0b148733a1121a6e0de195fbeb6f8dd /arch/s390/kernel/os_info.c | |
parent | ba2d394c60ad4b5d70cd449b9e6f6380c2e36a50 (diff) | |
download | linux-dc306186a130c6d9feb0aabc1c71b8ed1674a3bf.tar.bz2 |
s390/dump: fix old lowcore virtual vs physical address confusion
Virtual addresses of vmcore_info and os_info members are
wrongly passed to copy_oldmem_kernel(), while the function
expects physical address of the source. Instead, __pa()
macro should have been applied.
Yet, use of __pa() macro could be somehow confusing, since
copy_oldmem_kernel() may treat the source as an offset, not
as a direct physical address (that depens from the oldmem
availability and location).
Fix the virtual vs physical address confusion and make the
way the old lowcore is read consistent across all sources.
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>
Diffstat (limited to 'arch/s390/kernel/os_info.c')
-rw-r--r-- | arch/s390/kernel/os_info.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/os_info.c b/arch/s390/kernel/os_info.c index fa2be71b2c6b..a2b08d3f53ec 100644 --- a/arch/s390/kernel/os_info.c +++ b/arch/s390/kernel/os_info.c @@ -15,6 +15,7 @@ #include <asm/checksum.h> #include <asm/lowcore.h> #include <asm/os_info.h> +#include <asm/asm-offsets.h> /* * OS info structure has to be page aligned @@ -123,7 +124,7 @@ static void os_info_old_init(void) return; if (!oldmem_data.start) goto fail; - if (copy_oldmem_kernel(&addr, &S390_lowcore.os_info, sizeof(addr))) + if (copy_oldmem_kernel(&addr, (void *)__LC_OS_INFO, sizeof(addr))) goto fail; if (addr == 0 || addr % PAGE_SIZE) goto fail; |