public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: kumagai-atsushi@mxc.nes.nec.co.jp
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH v2 10/14] Generate and save VMCOREINFO and ELF note information
Date: Tue, 20 Dec 2011 18:31:58 +0900 (   )	[thread overview]
Message-ID: <20111220.183158.52163975.d.hatayama@jp.fujitsu.com> (raw)
In-Reply-To: <20111220171812.874961f9.kumagai-atsushi@mxc.nes.nec.co.jp>

Hello Kumagai-san,

From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Subject: Re: [PATCH v2 10/14] Generate and save VMCOREINFO and ELF note information
Date: Tue, 20 Dec 2011 17:18:12 +0900

> Hi Hatayama-san,
> 
>> [snipped]
>>
>> diff --git a/elf_info.c b/elf_info.c
>> index 114dd05..48f8510 100644
>> --- a/elf_info.c
>> +++ b/elf_info.c
>> @@ -760,7 +760,7 @@ get_nr_cpus(void)
>>  int
>>  has_pt_note(void)
>>  {
>> -	if (offset_pt_note_memory && size_pt_note_memory)
>> +	if (offset_pt_note_memory || size_pt_note_memory)
>>  		return TRUE;
>>  	return FALSE;
>>  }
> 
> I have a question.
> In what kind of case is only one of the offset or the size set to 0 in PT_NOTE?
> 

Thanks for your reviewing.

On sadump processing, offset_pt_note_memory represents file offset to
a temporary file created specifically for writing PT_NOTE section. So
offset_pt_note_memory is always 0. Its file pointer is set to struct
sadump_info::file_elf_note. Please look at the end of
sadump_generate_elf_note_from_dumpfile().

On the other hand, on both ELF and kdump-compressed format, PT_NOTE
section is always located in the middle of the vmcores. On either
formats, there's always another header before the PT_NOTE section: on
ELF, ELF header, and on kdump-compressed format, at least. So
offset_pt_note_memory is always strictly greater than 0 on these
formats.

If condition of has_pt_note() is not weakened in such a way,
has_pt_note() amounts to always false and execution in
write_kdump_header() always passes through writing oepration for
PT_NOTE section.

Thanks.
HATAYAMA, Daisuke


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

  reply	other threads:[~2011-12-20  9:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28  9:48 [PATCH v2 00/14] Support Fujitsu Stand Alone Dump Format HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 01/14] Add sadump module header file HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 02/14] Extend DumpInfo structure HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 03/14] Implement command-line processing HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 04/14] Verify and read VMCORE(s) in sadump-related formats HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 05/14] Export helpers for bitmap table handling HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 06/14] Initialize internal data according to sadump-related formats HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 07/14] Initialize debug information for ELF note extraction HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 08/14] Implement readmem() interface on sadump-related formats HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 09/14] Estimate phys_base based on linux_banner position HATAYAMA Daisuke
2011-10-28  9:48 ` [PATCH v2 10/14] Generate and save VMCOREINFO and ELF note information HATAYAMA Daisuke
2011-12-20  8:18   ` Atsushi Kumagai
2011-12-20  9:31     ` HATAYAMA Daisuke [this message]
2011-12-21  8:22       ` Atsushi Kumagai
2011-12-21  8:39         ` HATAYAMA Daisuke
2011-10-28  9:49 ` [PATCH v2 11/14] Procees CPUs based on online ones HATAYAMA Daisuke
2011-10-28  9:49 ` [PATCH v2 12/14] Read kexec backup region HATAYAMA Daisuke
2011-10-28  9:49 ` [PATCH v2 13/14] Add description of sadump-related formts in usage information HATAYAMA Daisuke
2011-10-28  9:49 ` [PATCH v2 14/14] Add description of sadump-related formats in manual page HATAYAMA Daisuke
2011-10-28 12:05 ` [PATCH v2 00/14] Support Fujitsu Stand Alone Dump Format tachibana
2011-12-15  6:47   ` HATAYAMA Daisuke
2011-12-15  8:55     ` tachibana
2011-12-15  9:09       ` HATAYAMA Daisuke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111220.183158.52163975.d.hatayama@jp.fujitsu.com \
    --to=d.hatayama@jp.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox