Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] makedumpfile: Use file offset in initialize_mmap()
@ 2015-02-27 12:14 Petr Tesarik
  2015-03-03  1:31 ` Atsushi Kumagai
  2015-03-03  9:15 ` Michael Holzheu
  0 siblings, 2 replies; 7+ messages in thread
From: Petr Tesarik @ 2015-02-27 12:14 UTC (permalink / raw)
  To: Atsushi Kumagai; +Cc: Michael Holzheu, kexec mailing list

Hi all,

update_mmap_range() expects a file offset as its first argument, but
initialize_mmap() passes a physical address. Since the first segment
usually starts at physical addr 0 on S/390, but there is no segment 
at file offset 0, update_mmap_range() fails, and makedumpfile falls
back to read().

@Michael: I wonder how you actually tested the kernel mmap patches;
this bug has prevented mmap on all my s390 systems...

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

---
 makedumpfile.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -347,7 +347,7 @@ initialize_mmap(void) {
 	info->mmap_buf = MAP_FAILED;
 
 	get_pt_load(0, &phys_start, NULL, NULL, NULL);
-	if (!update_mmap_range(phys_start, 1))
+	if (!update_mmap_range(paddr_to_offset(phys_start), 1))
 		return FALSE;
 
 	return TRUE;

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-06  9:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 12:14 [PATCH] makedumpfile: Use file offset in initialize_mmap() Petr Tesarik
2015-03-03  1:31 ` Atsushi Kumagai
2015-03-03  9:15 ` Michael Holzheu
2015-03-03 10:07   ` Petr Tesarik
2015-03-04 12:44     ` Michael Holzheu
2015-03-05 21:30       ` Petr Tesarik
2015-03-06  9:11         ` Michael Holzheu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox