mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kdump: Fix exported size of vmcoreinfo note
@ 2014-01-14 19:33 Vivek Goyal
  2014-01-14 19:35 ` Vivek Goyal
  2014-01-14 23:35 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Vivek Goyal @ 2014-01-14 19:33 UTC (permalink / raw)
  To: linux kernel mailing list, Andrew Morton; +Cc: Kexec Mailing List, Greg KH

Right now we seem to be exporting the max data size contained inside
vmcoreinfo note. But this does not include the size of meta data around
vmcore info data. Like name of the note and starting and ending elf_note.

I think user space expects total size and that size is put in PT_NOTE
elf header. Things seem to be fine so far because we are not using
vmcoreinfo note to the maximum capacity. But as it starts filling up,
to capacity, at some point of time, problem will be visible.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
 kernel/ksysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/kernel/ksysfs.c
===================================================================
--- linux-2.6.orig/kernel/ksysfs.c	2014-01-14 14:09:42.107767503 -0500
+++ linux-2.6/kernel/ksysfs.c	2014-01-14 14:15:24.385510314 -0500
@@ -126,7 +126,7 @@ static ssize_t vmcoreinfo_show(struct ko
 {
 	return sprintf(buf, "%lx %x\n",
 		       paddr_vmcoreinfo_note(),
-		       (unsigned int)vmcoreinfo_max_size);
+		       (unsigned int)sizeof(vmcoreinfo_note));
 }
 KERNEL_ATTR_RO(vmcoreinfo);
 

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

end of thread, other threads:[~2014-01-15 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 19:33 [PATCH] kdump: Fix exported size of vmcoreinfo note Vivek Goyal
2014-01-14 19:35 ` Vivek Goyal
2014-01-14 23:35 ` Andrew Morton
2014-01-15 15:12   ` Vivek Goyal

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

all inboxes | Powered by JetHome®