From: Baoquan He <bhe@redhat.com>
To: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: Re: where/how 2nd kernel's elfcorehdr_addr comes from
Date: Sat, 5 Nov 2022 09:49:44 +0800 [thread overview]
Message-ID: <Y2XBOErUs8qQE0Ki@MiWiFi-R3L-srv> (raw)
In-Reply-To: <72d4be26-1711-aab8-50ed-8af538b4f6eb@fujitsu.com>
On 11/04/22 at 09:03am, lizhijian@fujitsu.com wrote:
> Hi folks,
>
> I'm trying to add pmem's metadata(located at pmem device) to
> /proc/vmcore. To accomplish this, I think
>
> something i need to know is where the contents of /proc/vmcore come
> from, and then append
>
> something into it.
>
> I have read
> https://opensource.com/article/17/6/kdump-usage-and-internals, and knew
> /proc/vmcore is a elf file.
>
> It mentioned that "Creates /proc/vmcore as per elfcorehdr information
> received", but i don't get how it
>
> elfcorehdr(maybe elfcorehdr_addr) be assigned in 2nd kernel.
>
> I tried to grep it in the kernel source, but still no answer. So i deep
> hope you guys can give me some hints or answer.
Since you have studied this, so:
crash_prepare_elf64_headers() is the place where elf header of vmcore is
contructed in 1st kernel. And in crash_load_segments() it's prepared to
be passed out. I am talking about x86, and kexec_file load. You should
be able to find the similar thing in user space code.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
prev parent reply other threads:[~2022-11-05 1:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 9:03 where/how 2nd kernel's elfcorehdr_addr comes from lizhijian
2022-11-05 1:38 ` lizhijian
2022-11-05 1:49 ` Baoquan He [this message]
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=Y2XBOErUs8qQE0Ki@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=lizhijian@fujitsu.com \
/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