mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Hui Zhu <teawater@gmail.com>
Cc: saeed bishara <saeed.bishara@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Nicolas Pitre <nico@fluxnic.net>,
	Ralf Baechle <ralf@linux-mips.org>,
	David Daney <ddaney@caviumnetworks.com>,
	Tomaso Paoletti <tpaoletti@caviumnetworks.com>,
	Chris Dearman <chris@mips.com>,
	Paul Gortmaker <Paul.Gortmaker@windriver.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Frederic Weisbecker <fweisbec@gmail.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Brian Gerst <brgerst@gmail.com>, Tejun Heo <tj@kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
	Coly Li <coly.li@suse.de>
Subject: Re: [PATCH] stack2core: show stack message and convert it to core file when kernel die
Date: Sun, 3 Jan 2010 16:03:13 +0000	[thread overview]
Message-ID: <20100103160313.GA21156@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <daef60381001030705r93b3fbfkc50e7b9bbc62b334@mail.gmail.com>

On Sun, Jan 03, 2010 at 11:05:05PM +0800, Hui Zhu wrote:
> Hello,
> 
> For, when the kernel die, the user will get some message like:
> PC is at kernel_init+0xd4/0x104
> LR is at _atomic_dec_and_lock+0x48/0x6c
> pc : [<c0008470>]    lr : [<c01911f8>]    psr: 60000013
> sp : c7823fd8  ip : c7823f48  fp : c7823ff4
> Stack: (0xc7823fd8 to 0xc7824000)
> 3fc0:                                                       00000000 00000001
> Backtrace:
> [<c000839c>] (kernel_init+0x0/0x104) from [<c0042660>] (do_exit+0x0/0x880)
> This backtrace have some wrong message sometime and cannot get any
> val. Of course, kdump can get more message.  But it need do some a lot
> of other config.

If you have frame pointers enabled, the backtrace is _never_ wrong.
It only goes wrong if you disable frame pointers, at which point the
unwind tables have to be used.

> When kernel die, show some message:
> S2C:elf_class=1
> S2C:elf_data=1
> S2C:elf_arch=40
> S2C:elf_osabi=0
> S2C:r0=0x00000000;
> S2C:r1=0xc7822000;
> S2C:r2=0xc7823f48;
> S2C:r3=0x00000003;
> S2C:r4=0x00000000;
> S2C:r5=0x00000000;
> S2C:r6=0x00000000;
> S2C:r7=0x00000000;
> S2C:r8=0x00000000;
> S2C:r9=0x00000000;
> S2C:r10=0x00000000;
> S2C:fp=0xc7823ff4;
> S2C:ip=0xc7823f48;
> S2C:sp=0xc7823fd8;
> S2C:lr=0xc01911f8;
> S2C:pc=0xc0008470;
> S2C:cpsr=0x60000013;
> S2C:ORIG_r0=0xffffffff;
> 
> S2C:stack=0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
> S2C:stack=0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> S2C:stack=0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x82, 0xc7,
> S2C:stack=0x60, 0x26, 0x04, 0xc0, 0xa8, 0x83, 0x00, 0xc0,
> S2C:stack=0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

Please don't invent yet another way of dumping stuff out of the kernel.
What we already have is sufficient for your needs - there's no reason
what so ever to change it to achieve your goals.  We already dump the
registers and the stack, which seems to be all that you require.

  reply	other threads:[~2010-01-03 16:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 15:05 Hui Zhu
2010-01-03 16:03 ` Russell King - ARM Linux [this message]
2010-01-03 16:30   ` Hui Zhu
2010-01-03 16:44     ` Russell King - ARM Linux
2010-01-03 16:55       ` Hui Zhu
2010-01-03 17:10         ` Russell King - ARM Linux
2010-01-03 17:18           ` Hui Zhu
2010-01-03 17:37             ` Hui Zhu
2010-01-03 17:26         ` Arjan van de Ven
2010-01-03 17:39           ` Hui Zhu
2010-01-03 17:47             ` Russell King - ARM Linux
2010-01-03 18:32               ` Marek Vasut
2010-01-03 22:49 ` Tejun Heo
2010-01-03 23:01   ` Arjan van de Ven
2010-01-03 23:07     ` Tejun Heo
2010-01-03 23:14       ` Arjan van de Ven
2010-01-03 23:24         ` Tejun Heo
2010-01-04 16:22         ` Hui Zhu
2010-01-04 23:03           ` Tejun Heo
2010-01-05  9:04             ` Hui Zhu
2010-01-05  9:20               ` Tejun Heo
2010-01-06  7:07                 ` Hui Zhu

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=20100103160313.GA21156@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=Paul.Gortmaker@windriver.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=brgerst@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=chris@mips.com \
    --cc=coly.li@suse.de \
    --cc=ddaney@caviumnetworks.com \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mingo@redhat.com \
    --cc=nico@fluxnic.net \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=ralf@linux-mips.org \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=saeed.bishara@gmail.com \
    --cc=teawater@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=tpaoletti@caviumnetworks.com \
    --cc=x86@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®