Skip to contentSkip to conversation

s390 fixes

PATCH In review Alexander Gordeev 2 participants 4 messages Sep 30, 2024 – Oct 1, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover s390 fixes

Hi All,

Please find patches that fix issues on s390 only.

Thanks!

Alexander Gordeev (2):
Submit physical address to is_phys_addr()
s390x: Assume zero value of OS_INFO pointer is valid

 arch/s390x.c | 3 +--
 elf_info.c   | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
Signature · 7 lines
2.43.0


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

PATCH 1/2 Submit physical address to is_phys_addr()

ELF program table virtual address is submitted to is_phys_addr() function, most likely as a leftover of replaced is_vmalloc_addr() function. Submit the physical address instead.

This fixes the below error when CONFIG_RANDOMIZE_IDENTITY_BASE kernel configuration option on s390 is enabled:

get_kcore_dump_loads: Can't get the correct number of PT_LOAD. Success

Fixes 2e452d75fa78 ("[PATCH v3] Enable --mem-usage for s390x.")
---
 elf_info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
elf_info.c +2 -2
index bc24083..7f3d053 100644
@@ -765,7 +765,7 @@ int get_kcore_dump_loads(void)
 	for (i = 0; i < num_pt_loads; ++i) {
 		struct pt_load_segment *p = &pt_loads[i];
 		if (p->phys_start == NOT_PADDR
-				|| !is_phys_addr(p->virt_start))
+				|| !is_phys_addr(p->phys_start))
 			continue;
 		loads++;
 	}
@@ -786,7 +786,7 @@ int get_kcore_dump_loads(void)
 	for (i = 0, j = 0; i < num_pt_loads; ++i) {
 		struct pt_load_segment *p = &pt_loads[i];
 		if (p->phys_start == NOT_PADDR
-				|| !is_phys_addr(p->virt_start))
+				|| !is_phys_addr(p->phys_start))
 			continue;
 		if (j >= loads) {
 			free(pls);
Signature · 7 lines
2.43.0


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#2 lore raw

PATCH 2/2 s390x: Assume zero value of OS_INFO pointer is valid

In reply to Alexander Gordeev

An assumption that zero value of OS_INFO pointer is not valid leads to a failure of --mem-usage argument against /proc/kcore:

s390x_init_vm: Can't get s390x os_info ptr.

Fixes 9d58c2630c71 ("s390x: uncouple virtual and physical address spaces")
---
 arch/s390x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390x.c +1 -2
index 4a993be..f9a055d 100644
@@ -156,8 +156,7 @@ static int s390x_init_vm(void)
 	struct os_info os_info;
 	ulong addr;
 
-	if (!readmem(PADDR, S390X_LC_OS_INFO, &addr,
-			sizeof(addr)) || !addr) {
+	if (!readmem(PADDR, S390X_LC_OS_INFO, &addr, sizeof(addr))) {
 		ERRMSG("Can't get s390x os_info ptr.\n");
 		return FALSE;
 	}
Signature · 7 lines
2.43.0


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#3 lore raw
In reply to Alexander Gordeev
Quoted 6 lines · Alexander Gordeev

Hi All,

Please find patches that fix issues on s390 only.

Thanks!

Quoted 8 lines

Alexander Gordeev (2):
Submit physical address to is_phys_addr()
s390x: Assume zero value of OS_INFO pointer is valid

  arch/s390x.c | 3 +--
  elf_info.c   | 4 ++--
  2 files changed, 3 insertions(+), 4 deletions(-)

Thank you for the patches, look good and applied.

https://github.com/makedumpfile/makedumpfile/commit/195884556117f0a4162d480a586a0eefbbe413b2
https://github.com/makedumpfile/makedumpfile/commit/90dc30d9c95cceca0f1d14573cf68d982b9a93f3

Thanks,
Kazu
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec