public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, kaslr: export offset in VMCOREINFO ELF notes
@ 2014-01-22 23:56 Kees Cook
  2014-01-23  9:19 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Kees Cook @ 2014-01-22 23:56 UTC (permalink / raw)
  To: crash-utility
  Cc: linux-kernel, Dave Anderson, Andrew Honig, Eugene Surovegin,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Yinghai Lu

Include kASLR offset in VMCOREINFO ELF notes to assist in debugging.

Signed-off-by: Eugene Surovegin <surovegin@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 arch/x86/kernel/machine_kexec_64.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 4eabc160696f..679cef0791cd 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -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);
 }
 
-- 
1.7.9.5

-- 
Kees Cook
Chrome OS Security

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

end of thread, other threads:[~2014-01-23 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 23:56 [PATCH] x86, kaslr: export offset in VMCOREINFO ELF notes Kees Cook
2014-01-23  9:19 ` Ingo Molnar
2014-01-23 17:29   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox