kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: kumagai-atsushi@mxc.nes.nec.co.jp
Cc: dyoung@redhat.com, kexec@lists.infradead.org,
	thgarnie@google.com, Baoquan He <bhe@redhat.com>,
	tonli@redhat.com
Subject: [PATCH v2 2/3] makedumpfile: Move get_versiondep_info calling earlier
Date: Thu,  6 Oct 2016 17:50:07 +0800	[thread overview]
Message-ID: <1475747408-25666-3-git-send-email-bhe@redhat.com> (raw)
In-Reply-To: <1475747408-25666-1-git-send-email-bhe@redhat.com>

Because is_vmalloc_addr_x86_64 need be called very early, e.g in
readmem(). So we have to move get_versiondep_info calling earlier
to let PAGE_OFFSET/VMALLOC_START/VMEMMAP_START get value before
use them.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 makedumpfile.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 89e1089..e132550 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3835,6 +3835,9 @@ initial(void)
 	if (!get_value_for_old_linux())
 		return FALSE;
 
+	if (!get_versiondep_info())
+		return FALSE;
+
 	if (info->flag_mem_usage && !get_kcore_dump_loads())
 		return FALSE;
 
@@ -3986,9 +3989,6 @@ out:
 		if (!check_release())
 			return FALSE;
 
-		if (!get_versiondep_info())
-			return FALSE;
-
 		/*
 		 * NOTE: This must be done before refering to
 		 * VMALLOC'ed memory. The first 640kB contains data
-- 
2.5.5


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

  parent reply	other threads:[~2016-10-06  9:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06  9:50 [PATCH v2 0/3] makedumpfile: Add support of mm randomization Baoquan He
2016-10-06  9:50 ` [PATCH v2 1/3] makedumpfile: Get info->kernel_version from SYMBOL(init_uts_ns) earlier Baoquan He
2016-10-06  9:50 ` Baoquan He [this message]
2016-10-06  9:50 ` [PATCH v2 3/3] makedumpfile: Add support for MM randomization Baoquan He
2016-10-06 10:23 ` [PATCH v2 0/3] makedumpfile: Add support of mm randomization Baoquan He

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=1475747408-25666-3-git-send-email-bhe@redhat.com \
    --to=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=thgarnie@google.com \
    --cc=tonli@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;
as well as URLs for NNTP newsgroup(s).