All of lore.kernel.org
 help / color / mirror / Atom feed
* makedumpfile fails on 4.4 longterm kernel with kaslr enabled
@ 2018-03-26  1:20 daichi1.fukui
  2018-03-29  8:00 ` Masaki Tachibana
  0 siblings, 1 reply; 2+ messages in thread
From: daichi1.fukui @ 2018-03-26  1:20 UTC (permalink / raw)
  To: kexec; +Cc: daichi1.fukui

Dear makedumpfile community,

Hi. My name is Fukui.
Please help me investigate an error related to makedumpfile.

When running the latest makedumpfile 1.6.3 on the Linux 4.4 kernel, we get an error:

-------------------------------------------
vtop4_x86_64: Can't get a valid pml4.
readmem: Can't convert a virtual address(22000000) to physical Address
readmem: type_addr: 0, addr:22000000, size:8
get_page_offset_x86_64: Can't read page_offset_base

makedumpfile Failed.
-------------------------------------------

After investigating the cause of this error, we found that the following patch fails to work correctly on Linux 4.4 kernel: 

[PATCH v5 2/2] x86_64: Calculate page_offset in case of re-filtering/sadump/virsh dump
https://sourceforge.net/p/makedumpfile/code/ci/4944f934845c81f28667b4d7d6452edba062e8e2/

For your information, here is our testing environment.
Linux kernel version: 4.4.112
makedumpfile version: 1.6.3 

According to the patch, the get_symbol_addr function gets the address of symbol "page_offset_base".

+       if (info->kaslr_offset) {
+               page_offset_base = get_symbol_addr("page_offset_base");
+               page_offset_base += info->kaslr_offset;

However, the symbol is available since Linux 4.8, so Linux 4.4 does not have the symbol.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=021182e52fe01c1f7b126f97fd6ba048dc4234fd

In addition, the patch depends on CONFIG_RANDOMIZE_MEMORY, but Linux 4.4 does not support the configuration.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=0483e1fa6e09d4948272680f691dccb1edb9677f

In short, on Linux 4.4, the kaslr patch (x86_64: Calculate page_offset in case of re-filtering/sadump/virsh dump)
does not work correctly because of lacking both of the symbol and the configuration.

Some may think why we run makedumpfile on Linux 4.4. 
We aim at building a longterm supportable Linux system on a PC platform.
Because 4.4 is a longterm release kernel, the kernel is very suitable for our goal.

Range of this influence can be large because Linux 4.4 will be maintained until 2020.
See kernel.org for details:
https://www.kernel.org/category/releases.html

Can you help us correct the compatibility issue?

Thanks,
Fukui




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

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

* RE: makedumpfile fails on 4.4 longterm kernel with kaslr enabled
  2018-03-26  1:20 makedumpfile fails on 4.4 longterm kernel with kaslr enabled daichi1.fukui
@ 2018-03-29  8:00 ` Masaki Tachibana
  0 siblings, 0 replies; 2+ messages in thread
From: Masaki Tachibana @ 2018-03-29  8:00 UTC (permalink / raw)
  To: daichi1.fukui; +Cc: Masahiko Hayashi, kexec

Hi Fukui-san

Thank you for the detailed report.
And sorry that makedumpfile doesn't have the enough compatibility.
Unfortunately, my idea is only to disable KASLR.
If no one propose another way, please consider it.

Thanks
Tachibana

> -----Original Message-----
> From: kexec [mailto:kexec-bounces@lists.infradead.org] On Behalf Of daichi1.fukui@toshiba.co.jp
> Sent: Monday, March 26, 2018 10:21 AM
> To: kexec@lists.infradead.org
> Cc: daichi1.fukui@toshiba.co.jp
> Subject: makedumpfile fails on 4.4 longterm kernel with kaslr enabled
> 
> Dear makedumpfile community,
> 
> Hi. My name is Fukui.
> Please help me investigate an error related to makedumpfile.
> 
> When running the latest makedumpfile 1.6.3 on the Linux 4.4 kernel, we get an error:
> 
> -------------------------------------------
> vtop4_x86_64: Can't get a valid pml4.
> readmem: Can't convert a virtual address(22000000) to physical Address
> readmem: type_addr: 0, addr:22000000, size:8
> get_page_offset_x86_64: Can't read page_offset_base
> 
> makedumpfile Failed.
> -------------------------------------------
> 
> After investigating the cause of this error, we found that the following patch fails to work correctly on Linux 4.4 kernel:
> 
> [PATCH v5 2/2] x86_64: Calculate page_offset in case of re-filtering/sadump/virsh dump
> https://sourceforge.net/p/makedumpfile/code/ci/4944f934845c81f28667b4d7d6452edba062e8e2/
> 
> For your information, here is our testing environment.
> Linux kernel version: 4.4.112
> makedumpfile version: 1.6.3
> 
> According to the patch, the get_symbol_addr function gets the address of symbol "page_offset_base".
> 
> +       if (info->kaslr_offset) {
> +               page_offset_base = get_symbol_addr("page_offset_base");
> +               page_offset_base += info->kaslr_offset;
> 
> However, the symbol is available since Linux 4.8, so Linux 4.4 does not have the symbol.
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=021182e52fe01c1f7b126f97fd6ba048d
> c4234fd
> 
> In addition, the patch depends on CONFIG_RANDOMIZE_MEMORY, but Linux 4.4 does not support the configuration.
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=0483e1fa6e09d4948272680f691dccb1e
> db9677f
> 
> In short, on Linux 4.4, the kaslr patch (x86_64: Calculate page_offset in case of re-filtering/sadump/virsh dump)
> does not work correctly because of lacking both of the symbol and the configuration.
> 
> Some may think why we run makedumpfile on Linux 4.4.
> We aim at building a longterm supportable Linux system on a PC platform.
> Because 4.4 is a longterm release kernel, the kernel is very suitable for our goal.
> 
> Range of this influence can be large because Linux 4.4 will be maintained until 2020.
> See kernel.org for details:
> https://www.kernel.org/category/releases.html
> 
> Can you help us correct the compatibility issue?
> 
> Thanks,
> Fukui
> 
> 
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec



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

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

end of thread, other threads:[~2018-03-29  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26  1:20 makedumpfile fails on 4.4 longterm kernel with kaslr enabled daichi1.fukui
2018-03-29  8:00 ` Masaki Tachibana

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.