From: Vivek Goyal <vgoyal@in.ibm.com>
To: Haren Myneni <hbabu@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Morton Andrew Morton <akpm@osdl.org>,
Fastboot mailing list <fastboot@lists.osdl.org>,
Dave Anderson <anderson@redhat.com>,
linux kernel mailing list <linux-kernel@vger.kernel.org>,
fastboot-bounces@lists.osdl.org
Subject: Re: [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFO tokernel core dumps
Date: Fri, 23 Sep 2005 10:49:38 +0530 [thread overview]
Message-ID: <20050923051938.GD3736@in.ibm.com> (raw)
In-Reply-To: <OF0A1E6B6F.F00DC760-ON87257084.005F99D6-88257084.00634A38@us.ibm.com>
On Thu, Sep 22, 2005 at 11:04:43AM -0700, Haren Myneni wrote:
> fastboot-bounces@lists.osdl.org wrote on 09/22/2005 09:31:52 AM:
>
> > Dave Anderson <anderson@redhat.com> writes:
> >
> > > Just flagging the cpu, and then mapping that to the stack pointer
> found in
> > > the associated NT_PRSTATUS register set should work OK too. It gets
> > > a little muddy if it crashed while running on an IRQ stack, but it
> > still can be
> > > tracked back from there as well. (although not if the crashing
> > task overflowed
> > > the IRQ stack)
> >
> > You can't track it back from the crashing cpu if the IRQ stack overflows
> > either. So I would rather have crash confused when trying to find the
> > task_struct. Then to have the kernel fail avoidably while attempting
> > to capture a core dump.
> >
> > Even if you overflow the stack wit a bit of detective work it should
> still
> > be possible to show the stack overflowed and correct for it when
> analyzing
> > the crash dump. Doing anything like that from a crashing cpu (in a
> > reliable way) is very hard.
> >
> > > The task_struct would be ideal though -- if the kernel's use of
> task_structs
> > > changes in the future, well, then crash is going to need a serious
> re-write
> > > anyway... FWIW, netdump and diskdump use the NT_TASKSTRUCT note
> > > note to store just the "current" pointer, and not the whole
> > task_struct itself,
> > > which would just be a waste of space in the ELF header for
> crash'spurposes.
> > > And looking at the gdb sources, it appears to be totally ignored. Who
> > > uses the NT_TASKSTRUCT note anyway?
> >
> > Good question, especially as the kernel exports whatever we have for
> > a task struct today in the ELF note. No ABI compatibility is
> > maintained.
> >
> > Given all of that I recommend an empty NT_TASKSTRUCT to flag the
> > crashing cpu, for now.
>
> At present /proc/kcore writes the complete task structure for
> NT_TASKSTRUCT note section. Thought it is the standard. Hence created
> separate note section. The other option is the crash tool can directly
> read "crashing_cpu variable" from the vmcore to determine the panic cpu.
> Similarly, we can define panic_task variable in the kernel.
crashing_cpu was introduced recently to handle one of the problems caused
due to NMI. I think we should not be relying on this variable. we get the
value of crashing_cpu by making smp_processor_id() call and this value will
be corrupted in case of stack overflow.
During OLS, Eric had suggested to either find a way to disable NMI after
panic() or may be read LAPIC id. Reading LAPIC id seems to be more reliable.
I think mkdump folks already do something similar.
So, in short, using crashing_cpu might not be a good idea. Down the line
this varibale might not be present at all.
>
> Basically, we can use some global structure in the kernel and dump any
> needed information which we do not need to invoke any analysis tools
> (crash, gdb). Dumping CPU control registers can also be done this way
> without creating separate note section.
>
> Thanks
> Haren
>
> Anyway, we already have crashing_cpu variable in the kernel.
> >
> > Eric
> > _______________________________________________
> > fastboot mailing list
> > fastboot@lists.osdl.org
> > https://lists.osdl.org/mailman/listinfo/fastboot
> _______________________________________________
> fastboot mailing list
> fastboot@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/fastboot
next prev parent reply other threads:[~2005-09-23 5:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-21 6:56 [PATCH] Kdump(x86): add note type NT_KDUMPINFO to kernel core dumps Vivek Goyal
2005-09-21 14:28 ` [Fastboot] " Eric W. Biederman
2005-09-21 15:17 ` [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFO tokernel " Dave Anderson
2005-09-22 9:01 ` Eric W. Biederman
2005-09-22 14:08 ` Vivek Goyal
2005-09-22 15:06 ` Dave Anderson
2005-09-22 16:31 ` Eric W. Biederman
2005-09-22 20:33 ` Haren Myneni
2005-09-23 5:09 ` Vivek Goyal
2005-09-23 7:22 ` Eric W. Biederman
2005-09-23 15:17 ` Subject: [PATCH] Don't uselessly export task_struct to user space in " Eric W. Biederman
[not found] ` <OF0A1E6B6F.F00DC760-ON87257084.005F99D6-88257084.00634A38@us.ibm.com>
2005-09-23 5:19 ` Vivek Goyal [this message]
[not found] ` <4332FD56.2F5256F5@redhat.com>
2005-09-23 7:12 ` [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFO tokernelcore dumps Eric W. Biederman
2005-09-23 12:01 ` Vivek Goyal
2005-09-26 6:29 ` Vivek Goyal
2005-09-22 16:38 ` [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFO tokernel core dumps Eric W. Biederman
2005-09-22 17:00 ` [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFOtokernel " Dave Anderson
2005-09-22 7:39 ` [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFO to kernel " Vivek Goyal
2005-09-22 7:46 ` Andrew Morton
2005-09-22 8:32 ` Vivek Goyal
2005-09-22 9:11 ` Eric W. Biederman
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=20050923051938.GD3736@in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=akpm@osdl.org \
--cc=anderson@redhat.com \
--cc=ebiederm@xmission.com \
--cc=fastboot-bounces@lists.osdl.org \
--cc=fastboot@lists.osdl.org \
--cc=hbabu@us.ibm.com \
--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