]> Pileus Git - ~andy/linux/commitdiff
x86, kaslr: export offset in VMCOREINFO ELF notes
authorEugene Surovegin <surovegin@google.com>
Thu, 23 Jan 2014 17:31:20 +0000 (09:31 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 26 Feb 2014 00:57:47 +0000 (16:57 -0800)
Include kASLR offset in VMCOREINFO ELF notes to assist in debugging.

[ hpa: pushing this for v3.14 to avoid having a kernel version with
  kASLR where we can't debug output. ]

Signed-off-by: Eugene Surovegin <surovegin@google.com>
Link: http://lkml.kernel.org/r/20140123173120.GA25474@www.outflux.net
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/machine_kexec_64.c

index 4eabc160696f510ec5ffaddc7939dd71856463d5..679cef0791cd842448216f4a6158cd2ae24fe0e0 100644 (file)
@@ -279,5 +279,7 @@ void arch_crash_save_vmcoreinfo(void)
        VMCOREINFO_SYMBOL(node_data);
        VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
 #endif
+       vmcoreinfo_append_str("KERNELOFFSET=%lx\n",
+                             (unsigned long)&_text - __START_KERNEL);
 }