From: Vivek Goyal <vgoyal@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
fastboot <fastboot@lists.osdl.org>
Subject: [RFC/PATCH 13/17][Kdump] Retrieve elfcorehdr address from command line
Date: Mon, 28 Mar 2005 18:57:23 +0530 [thread overview]
Message-ID: <1112016443.4001.84.camel@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: crashdump-x86-retrieve-elfcorehdr-addr.patch --]
[-- Type: message/rfc822, Size: 3562 bytes --]
From:
Subject: No Subject
Date: Mon, 28 Mar 2005 17:51:36 +0530
Message-ID: <1112012496.4001.55.camel@localhost.localdomain>
From: "Vivek Goyal" <vgoyal@in.ibm.com>
o This patch adds support for retrieving the address of elf core header if one
is passed in command line.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
linux-2.6.12-rc1-mm1-1M-root/Documentation/kernel-parameters.txt | 4 ++++
linux-2.6.12-rc1-mm1-1M-root/arch/i386/kernel/setup.c | 8 ++++++++
linux-2.6.12-rc1-mm1-1M-root/include/linux/crash_dump.h | 1 +
linux-2.6.12-rc1-mm1-1M-root/kernel/crash_dump.c | 3 +++
4 files changed, 16 insertions(+)
diff -puN arch/i386/kernel/setup.c~crashdump-x86-retrieve-elfcorehdr-addr arch/i386/kernel/setup.c
--- linux-2.6.12-rc1-mm1-1M/arch/i386/kernel/setup.c~crashdump-x86-retrieve-elfcorehdr-addr 2005-03-22 16:17:00.000000000 +0530
+++ linux-2.6.12-rc1-mm1-1M-root/arch/i386/kernel/setup.c 2005-03-22 16:17:00.000000000 +0530
@@ -42,6 +42,7 @@
#include <linux/edd.h>
#include <linux/nodemask.h>
#include <linux/kexec.h>
+#include <linux/crash_dump.h>
#include <video/edid.h>
@@ -860,6 +861,13 @@ static void __init parse_cmdline_early (
}
}
#endif
+#ifdef CONFIG_CRASH_DUMP
+ /* elfcorehdr= specifies the location of elf core header
+ * stored by the crashed kernel.
+ */
+ else if (!memcmp(from, "elfcorehdr=", 11))
+ elfcorehdr_addr = memparse(from+11, &from);
+#endif
/*
* highmem=size forces highmem to be exactly 'size' bytes.
diff -puN Documentation/kernel-parameters.txt~crashdump-x86-retrieve-elfcorehdr-addr Documentation/kernel-parameters.txt
--- linux-2.6.12-rc1-mm1-1M/Documentation/kernel-parameters.txt~crashdump-x86-retrieve-elfcorehdr-addr 2005-03-22 16:17:00.000000000 +0530
+++ linux-2.6.12-rc1-mm1-1M-root/Documentation/kernel-parameters.txt 2005-03-22 16:17:00.000000000 +0530
@@ -455,6 +455,10 @@ running once the system is up.
Format: {"as"|"cfq"|"deadline"|"noop"}
See Documentation/block/as-iosched.txt
and Documentation/block/deadline-iosched.txt for details.
+ elfcorehdr= [IA-32]
+ Specifies physical address of start of kernel core image
+ elf header.
+ See Documentation/kdump.txt for details.
enforcing [SELINUX] Set initial enforcing status.
Format: {"0" | "1"}
diff -puN include/linux/crash_dump.h~crashdump-x86-retrieve-elfcorehdr-addr include/linux/crash_dump.h
--- linux-2.6.12-rc1-mm1-1M/include/linux/crash_dump.h~crashdump-x86-retrieve-elfcorehdr-addr 2005-03-22 16:17:00.000000000 +0530
+++ linux-2.6.12-rc1-mm1-1M-root/include/linux/crash_dump.h 2005-03-22 16:17:00.000000000 +0530
@@ -7,6 +7,7 @@
#include <linux/device.h>
#include <linux/proc_fs.h>
+extern unsigned long long elfcorehdr_addr;
extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
unsigned long, int);
#endif /* CONFIG_CRASH_DUMP */
diff -puN kernel/crash_dump.c~crashdump-x86-retrieve-elfcorehdr-addr kernel/crash_dump.c
--- linux-2.6.12-rc1-mm1-1M/kernel/crash_dump.c~crashdump-x86-retrieve-elfcorehdr-addr 2005-03-22 16:17:00.000000000 +0530
+++ linux-2.6.12-rc1-mm1-1M-root/kernel/crash_dump.c 2005-03-22 16:17:00.000000000 +0530
@@ -15,6 +15,9 @@
#include <asm/io.h>
#include <asm/uaccess.h>
+/* Stores the physical address of elf header of crash image. */
+unsigned long long elfcorehdr_addr;
+
/*
* Copy a page from "oldmem". For this page, there is no pte mapped
* in the current kernel. We stitch up a pte, similar to kmap_atomic.
_
reply other threads:[~2005-03-28 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1112016443.4001.84.camel@localhost.localdomain \
--to=vgoyal@in.ibm.com \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=fastboot@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®