From: Dave Anderson <anderson@redhat.com>
To: Dave Young <dyoung@redhat.com>, kexec@lists.infradead.org
Cc: Pratyush Anand <panand@redhat.com>,
ats-kumagai@wm.jp.nec.com, bhe@redhat.com
Subject: Re: [PATCH Makedumpfile 0/4] x86_64: Fix page_offset for randomized base enabled
Date: Thu, 27 Oct 2016 11:25:20 -0400 (EDT) [thread overview]
Message-ID: <595835228.8595706.1477581920601.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <926225735.8567580.1477574985798.JavaMail.zimbra@redhat.com>
----- Original Message -----
>
> That being said, my recent 4.8 and 4.9 KASLR testing has been on live
> systems and compressed kdumps, so the old tried-and-true manner of
> calculating the phys_base from the ELF PT_LOAD segments apparently
> no longer works with KASLR.
>
> It would be so much more helpful if the VMCOREINFO data in the ELF
> header stored the actual phys_base value instead of its symbol value:
>
> crash> help -D
> ...
> SYMBOL(phys_base)=ffffffffa740b010
> ...
>
> which is completely useless unless the phys_base value is known.
>
> Anyway, can you send me the makedumpfile code that calculates the
> phys_base value?
>
> Dave
As it turns out, the problem with the crash utility is that it has to
calculate phys_base well before it even knows the kernel has been relocated
by KASLR. So when it sees the __START_KERNEL_map PT_LOAD segment, it mistakes
it for the kernel modules' virtual address region and skips it.
The kernel has this:
#if defined(CONFIG_RANDOMIZE_BASE)
#define KERNEL_IMAGE_SIZE (1024 * 1024 * 1024)
#else
#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
#endif
and then this:
#define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
So with KASLR, MODULES_VADDR gets pushed up from the traditional ffffffffa0000000
up to ffffffffc0000000.
So I'm curious as to what you use in makedumpfile to determine whether
CONFIG_RANDOMIZE_BASE has been configured?
Thanks,
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2016-10-27 15:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 16:48 [PATCH Makedumpfile 0/4] x86_64: Fix page_offset for randomized base enabled Pratyush Anand
2016-10-24 16:48 ` [PATCH] temp Pratyush Anand
2016-10-24 16:51 ` Pratyush Anand
2016-10-24 16:48 ` [PATCH Makedumpfile 1/4] x86_64: Calculate page_offset from pt_load Pratyush Anand
2016-10-27 6:03 ` Pratyush Anand
2016-11-02 7:40 ` Atsushi Kumagai
2016-11-02 8:02 ` bhe
2016-11-04 10:35 ` Atsushi Kumagai
2016-10-24 16:48 ` [PATCH Makedumpfile 2/4] x86_64: translate all VA to PA using page table values Pratyush Anand
2016-10-25 9:20 ` Atsushi Kumagai
2016-10-25 15:12 ` Pratyush Anand
2016-10-25 23:28 ` bhe
2016-10-26 6:24 ` Atsushi Kumagai
2016-10-24 16:48 ` [PATCH Makedumpfile 3/4] x86_64: kill is_vmalloc_addr_x86_64() Pratyush Anand
2016-10-24 16:48 ` [PATCH Makedumpfile 4/4] x86_64: kill some unused initialization Pratyush Anand
2016-10-25 9:17 ` [PATCH Makedumpfile 0/4] x86_64: Fix page_offset for randomized base enabled Louis Bouchard
2016-10-25 9:20 ` Pratyush Anand
2016-10-27 2:37 ` Dave Young
2016-10-27 2:54 ` Dave Young
2016-10-27 6:19 ` Dave Young
[not found] ` <926225735.8567580.1477574985798.JavaMail.zimbra@redhat.com>
2016-10-27 15:25 ` Dave Anderson [this message]
2016-10-27 15:41 ` Dave Anderson
2016-10-28 2:04 ` Dave Young
2016-10-27 15:59 ` Pratyush Anand
2016-10-27 3:25 ` Baoquan He
2016-10-27 5:11 ` Pratyush Anand
[not found] <mailman.65015.1477545113.1639.kexec@lists.infradead.org>
2016-10-27 13:25 ` Dave Anderson
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=595835228.8595706.1477581920601.JavaMail.zimbra@redhat.com \
--to=anderson@redhat.com \
--cc=ats-kumagai@wm.jp.nec.com \
--cc=bhe@redhat.com \
--cc=dyoung@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=panand@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