public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Dave Anderson <anderson@redhat.com>
To: kexec@lists.infradead.org
Cc: Baoquan He <bhe@redhat.com>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	usui@mxm.nes.nec.co.jp,
	HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>,
	lisa mitchell <lisa.mitchell@hp.com>,
	RuiRui Yang <ruyang@redhat.com>,
	Masaki Tachibana <tachibana@mxm.nes.nec.co.jp>,
	kumagai-atsushi <kumagai-atsushi@mxc.nes.nec.co.jp>,
	WANG Chao <chaowang@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
	"Discussion list for crash utility usage,
	maintenance and development" <crash-utility@redhat.com>
Subject: [BUG] [compressed kdump / SADUMP] makedumpfile header truncation error
Date: Mon, 16 Sep 2013 15:45:04 -0400 (EDT)	[thread overview]
Message-ID: <131560856.13730586.1379360704169.JavaMail.root@redhat.com> (raw)
In-Reply-To: <50924626.13720007.1379359322944.JavaMail.root@redhat.com>


Recent testing on very large memory systems dictates that an
update is required for the compressed kdump header generated
by makedumpfile.

The dumpfile header has this field, which was inherited from 
the old "diskdump" facility:

 struct disk_dump_header {
 ...
        unsigned int            max_mapnr;      /* = max_mapnr */
 ...

and which, among other things, is used by the crash utility as a
delimiter to determine whether a physical address read request is
legitimate.  And obviously the field cannot handle PFN values greater
than 32-bits.

The makedumpfile source code does have its own max_mapnr representation
in its DumpInfo structure in "makedumpfile.h":

 struct DumpInfo {
 ...
        unsigned long long      max_mapnr;   /* number of page descriptor */
 ...

But in its "diskdump_mod.h" file, it carries forward the old diskdump 
header format, which has the 32-bit field:

 struct disk_dump_header {
 ...
        unsigned int            max_mapnr;      /* = max_mapnr */
 ...

And here in "makedumpfile.c", the inadvertent truncation occurs
when the PFN is greater than 32-bits:

 int
 write_kdump_header(void)
 {
 ...
        dh->max_mapnr      = info->max_mapnr;
 ...

The 32-bit field has also been carried forward into the SADUMP header
as well, which has this in "sadump_mod.h":

 struct sadump_header {
	...
        uint32_t max_mapnr;     /* = max_mapnr */	
	...

And when these header structures change, the crash utility will need 
to be changed accordingly.

Preferably for backwards-compatibility, a new header_version can be 
created, with the new expanded field located in the kdump_sub_header
so that the original base structure can remain as-is.  But I leave that
up to the maintainers.

Thanks,
  Dave

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

       reply	other threads:[~2013-09-16 19:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50924626.13720007.1379359322944.JavaMail.root@redhat.com>
2013-09-16 19:45 ` Dave Anderson [this message]
2013-09-17  4:36   ` [BUG] [compressed kdump / SADUMP] makedumpfile header truncation error Jingbai Ma
2013-09-17  6:55     ` HATAYAMA Daisuke
2013-09-17  7:12       ` Jingbai Ma
2013-09-17  7:33         ` HATAYAMA Daisuke
2013-09-17  8:21           ` Jingbai Ma
2013-09-17 13:23             ` Dave Anderson
2013-09-18 10:30               ` Jingbai Ma
2013-09-18 14:17                 ` Dave Anderson
2013-09-19 12:55                   ` Ma, Jingbai (Kingboard)
2013-09-19 13:07                   ` Ma, Jingbai (Kingboard)
2013-09-17  6:41   ` 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=131560856.13730586.1379360704169.JavaMail.root@redhat.com \
    --to=anderson@redhat.com \
    --cc=bhe@redhat.com \
    --cc=chaowang@redhat.com \
    --cc=crash-utility@redhat.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=lisa.mitchell@hp.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --cc=ruyang@redhat.com \
    --cc=tachibana@mxm.nes.nec.co.jp \
    --cc=usui@mxm.nes.nec.co.jp \
    --cc=vgoyal@redhat.com \
    /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