diff mbox

[v17,10/13] arm64: kdump: add VMCOREINFO for user-space coredump tools

Message ID 9e75a7b75b38b37ded3e361498eaf1486107ce5d.1464974516.git.geoff@infradead.org (mailing list archive)
State New, archived
Headers show

Commit Message

Geoff Levand June 3, 2016, 6:13 p.m. UTC
From: AKASHI Takahiro <takahiro.akashi@linaro.org>

For the current crash utility, we need to know, at least, a value of
"kimage_voffset" to handle the contents of core dump file (/proc/vmcore)
correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6.

More VMCOREINFO may be added later for makedumpfile command.
---
 arch/arm64/kernel/machine_kexec.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Suzuki K Poulose June 9, 2016, 3:09 p.m. UTC | #1
On 03/06/16 19:13, Geoff Levand wrote:
> From: AKASHI Takahiro <takahiro.akashi@linaro.org>
>
> For the current crash utility, we need to know, at least, a value of
> "kimage_voffset" to handle the contents of core dump file (/proc/vmcore)
> correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6.
>
> More VMCOREINFO may be added later for makedumpfile command.
> ---

Missing Signed-off-by: ?

Suzuki
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Suzuki K Poulose June 9, 2016, 3:17 p.m. UTC | #2
On 09/06/16 16:09, Suzuki K Poulose wrote:
> On 03/06/16 19:13, Geoff Levand wrote:
>> From: AKASHI Takahiro <takahiro.akashi@linaro.org>
>>
>> For the current crash utility, we need to know, at least, a value of
>> "kimage_voffset" to handle the contents of core dump file (/proc/vmcore)
>> correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6.
>>
>> More VMCOREINFO may be added later for makedumpfile command.
>> ---
>
> Missing Signed-off-by: ?
>
> Suzuki
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>

Please ignore the disclaimer message above


Suzuki
AKASHI Takahiro June 9, 2016, 11:19 p.m. UTC | #3
On Thu, Jun 09, 2016 at 04:09:41PM +0100, Suzuki K Poulose wrote:
> On 03/06/16 19:13, Geoff Levand wrote:
> >From: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >
> >For the current crash utility, we need to know, at least, a value of
> >"kimage_voffset" to handle the contents of core dump file (/proc/vmcore)
> >correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6.
> >
> >More VMCOREINFO may be added later for makedumpfile command.
> >---
> 
> Missing Signed-off-by: ?

Thank you for pointing this out.
I didn't run checkpatch.pl for this version.

-Takahiro AKASHI

> Suzuki
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
diff mbox

Patch

diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c
index 92e8a92..ac3655f 100644
--- a/arch/arm64/kernel/machine_kexec.c
+++ b/arch/arm64/kernel/machine_kexec.c
@@ -22,6 +22,7 @@ 
 
 #include <asm/cacheflush.h>
 #include <asm/cpu_ops.h>
+#include <asm/memory.h>
 #include <asm/mmu_context.h>
 #include <asm/system_misc.h>
 
@@ -299,3 +300,10 @@  void machine_crash_shutdown(struct pt_regs *regs)
 
 	pr_info("Starting crashdump kernel...\n");
 }
+
+void arch_crash_save_vmcoreinfo(void)
+{
+	/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
+	vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
+						kimage_voffset);
+}