All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec-tools: Read always one vmcoreinfo file
@ 2012-07-05 12:16 ` Daniel Kiper
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Kiper @ 2012-07-05 12:16 UTC (permalink / raw)
  To: konrad.wilk, horms, olaf, kexec, xen-devel

vmcoreinfo file could exists under /sys/kernel (valid on baremetal only)
and/or under /sys/hypervisor (valid when Xen dom0 is running).
Read only one of them. It means that only one PT_NOTE will be
always created. Remove extra code for second PT_NOTE creation.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 kexec/crashdump-elf.c |   33 +++++++--------------------------
 1 files changed, 7 insertions(+), 26 deletions(-)

diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c
index 8d82db9..ec66548 100644
--- a/kexec/crashdump-elf.c
+++ b/kexec/crashdump-elf.c
@@ -40,8 +40,6 @@ int FUNC(struct kexec_info *info,
 	uint64_t notes_addr, notes_len;
 	uint64_t vmcoreinfo_addr, vmcoreinfo_len;
 	int has_vmcoreinfo = 0;
-	uint64_t vmcoreinfo_addr_xen, vmcoreinfo_len_xen;
-	int has_vmcoreinfo_xen = 0;
 	int (*get_note_info)(int cpu, uint64_t *addr, uint64_t *len);
 
 	if (xen_present())
@@ -53,16 +51,14 @@ int FUNC(struct kexec_info *info,
 		return -1;
 	}
 
-	if (get_kernel_vmcoreinfo(&vmcoreinfo_addr, &vmcoreinfo_len) == 0) {
-		has_vmcoreinfo = 1;
-	}
-
-	if (xen_present() &&
-	    get_xen_vmcoreinfo(&vmcoreinfo_addr_xen, &vmcoreinfo_len_xen) == 0) {
-		has_vmcoreinfo_xen = 1;
-	}
+	if (xen_present()) {
+		if (!get_xen_vmcoreinfo(&vmcoreinfo_addr, &vmcoreinfo_len))
+			has_vmcoreinfo = 1;
+	} else
+		if (!get_kernel_vmcoreinfo(&vmcoreinfo_addr, &vmcoreinfo_len))
+			has_vmcoreinfo = 1;
 
-	sz = sizeof(EHDR) + (nr_cpus + has_vmcoreinfo + has_vmcoreinfo_xen) * sizeof(PHDR) +
+	sz = sizeof(EHDR) + (nr_cpus + has_vmcoreinfo) * sizeof(PHDR) +
 	     ranges * sizeof(PHDR);
 
 	/*
@@ -179,21 +175,6 @@ int FUNC(struct kexec_info *info,
 		dbgprintf_phdr("vmcoreinfo header", phdr);
 	}
 
-	if (has_vmcoreinfo_xen) {
-		phdr = (PHDR *) bufp;
-		bufp += sizeof(PHDR);
-		phdr->p_type	= PT_NOTE;
-		phdr->p_flags	= 0;
-		phdr->p_offset  = phdr->p_paddr = vmcoreinfo_addr_xen;
-		phdr->p_vaddr   = 0;
-		phdr->p_filesz	= phdr->p_memsz	= vmcoreinfo_len_xen;
-		/* Do we need any alignment of segments? */
-		phdr->p_align	= 0;
-
-		(elf->e_phnum)++;
-		dbgprintf_phdr("vmcoreinfo_xen header", phdr);
-	}
-
 	/* Setup an PT_LOAD type program header for the region where
 	 * Kernel is mapped if elf_info->kern_size is non-zero.
 	 */
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 34+ messages in thread
* Re: [PATCH] kexec-tools: Read always one vmcoreinfo file
@ 2012-08-02 13:18 ` Daniel Kiper
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Kiper @ 2012-08-02 13:18 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ
  Cc: ptesarik-AlSwsSmVLrQ, olaf-QOLJcTWqO2uzQB+pC5nmwQ,
	xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA

Hi Simon,

[...]

> > If you spot any error in any logfile which in your opinion
> > is relevent to our testes please send me it.
>
> Hi,
>
> is there any consensus on what to do here?

As I know Petr was going to do some tests.
I have not received any reply from him till now.
Maybe he is busy or on vacation.

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: [PATCH] kexec-tools: Read always one vmcoreinfo file
@ 2012-08-02 13:27 ` Daniel Kiper
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Kiper @ 2012-08-02 13:27 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ
  Cc: ptesarik-AlSwsSmVLrQ, olaf-QOLJcTWqO2uzQB+pC5nmwQ,
	xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA

Hi,

> > > If you spot any error in any logfile which in your opinion
> > > is relevent to our testes please send me it.
> >
> > Hi,
> >
> > is there any consensus on what to do here?
>
> As I know Petr was going to do some tests.
> I have not received any reply from him till now.
> Maybe he is busy or on vacation.

According to automatic reply he is on vacation until 13/08/2012.

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: [PATCH] kexec-tools: Read always one vmcoreinfo file
@ 2012-08-06  9:32 ` Daniel Kiper
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Kiper @ 2012-08-06  9:32 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ
  Cc: ptesarik-AlSwsSmVLrQ, olaf-QOLJcTWqO2uzQB+pC5nmwQ,
	xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA

Hi,

[...]

> > > As I know Petr was going to do some tests.
> > > I have not received any reply from him till now.
> > > Maybe he is busy or on vacation.
> >
> > According to automatic reply he is on vacation until 13/08/2012.
>
> Thanks. I guess we should wait then.
>
> Incidently, I will be on vacation for a week from the 13th.

I am too but for three weeks. However, I will be reading
email from time to time.

Daniel

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: [PATCH] kexec-tools: Read always one vmcoreinfo file
@ 2012-09-10 12:06 ` Daniel Kiper
  0 siblings, 0 replies; 34+ messages in thread
From: Daniel Kiper @ 2012-09-10 12:06 UTC (permalink / raw)
  To: ptesarik-AlSwsSmVLrQ
  Cc: olaf-QOLJcTWqO2uzQB+pC5nmwQ,
	xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	horms-/R6kz+dDXgpPR4JQBCEnsQ, konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA

Hi Petr,

[...]

> > > As I know Petr was going to do some tests.
> > > I have not received any reply from him till now.
> > > Maybe he is busy or on vacation.
> >
> > According to automatic reply he is on vacation until 13/08/2012.
>
> Thanks. I guess we should wait then.

Have you done some tests of this patch?
Did you find any issues with it?

Daniel

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

end of thread, other threads:[~2014-12-19 20:22 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-05 12:16 [PATCH] kexec-tools: Read always one vmcoreinfo file Daniel Kiper
2012-07-05 12:16 ` Daniel Kiper
     [not found] ` <20120705121635.GA2007-UojuW/CpjwpdUOLzJiIvSsFoITBeLw/klGfBN0aaEZ+lPcVs/6D9LQ@public.gmane.org>
2012-07-06 13:49   ` Simon Horman
2012-07-06 13:49     ` Simon Horman
2012-07-23 12:56   ` Petr Tesarik
2012-07-23 12:56     ` Petr Tesarik
2012-07-23 13:30     ` Petr Tesarik
2012-07-23 13:30       ` Petr Tesarik
     [not found]       ` <201207231530.55871.ptesarik-AlSwsSmVLrQ@public.gmane.org>
2012-07-23 20:10         ` Daniel Kiper
2012-07-23 20:10           ` Daniel Kiper
2012-07-24  8:18           ` Petr Tesarik
2012-07-24  8:18             ` Petr Tesarik
     [not found]             ` <201207241018.35292.ptesarik-AlSwsSmVLrQ@public.gmane.org>
2012-07-24 13:54               ` Daniel Kiper
2012-07-24 13:54                 ` Daniel Kiper
     [not found]                 ` <20120724135410.GA2230-UojuW/CpjwpdUOLzJiIvSsFoITBeLw/klGfBN0aaEZ+lPcVs/6D9LQ@public.gmane.org>
2012-08-02  3:06                   ` Simon Horman
2012-08-02  3:06                     ` Simon Horman
2014-11-13 15:51                   ` Petr Tesarik
2014-11-13 15:51                     ` Petr Tesarik
     [not found]                     ` <20141113165148.4343b45e-7L324ngwNA8VI8jrpt9EEQ@public.gmane.org>
2014-11-13 17:22                       ` Daniel Kiper
2014-11-13 17:22                         ` Daniel Kiper
     [not found]                         ` <20141113172217.GD6522-fJNZiO034lp9pOct4yEdx/3oZC3j2Omk@public.gmane.org>
2014-11-13 18:14                           ` Petr Tesarik
2014-11-13 18:14                             ` Petr Tesarik
2014-12-19 20:21                       ` Daniel Kiper
2014-12-19 20:21                         ` Daniel Kiper
2012-08-02 13:18 Daniel Kiper
2012-08-02 13:18 ` Daniel Kiper
2012-08-02 13:27 Daniel Kiper
2012-08-02 13:27 ` Daniel Kiper
2012-08-06  8:27 ` Simon Horman
2012-08-06  8:27   ` Simon Horman
2012-08-06  9:32 Daniel Kiper
2012-08-06  9:32 ` Daniel Kiper
2012-09-10 12:06 Daniel Kiper
2012-09-10 12:06 ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.