From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Yuanzheng Song <songyuanzheng@huawei.com>
Cc: ardb@kernel.org, arnd@arndb.de, linus.walleij@linaro.org,
akpm@linux-foundation.org, ebiederm@xmission.com,
wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: fix the incorrect value of sp in __die()
Date: Mon, 18 Apr 2022 09:03:02 +0100 [thread overview]
Message-ID: <Yl0bNhQwwnclGKKX@shell.armlinux.org.uk> (raw)
In-Reply-To: <20220418034516.521046-1-songyuanzheng@huawei.com>
On Mon, Apr 18, 2022 at 03:45:16AM +0000, Yuanzheng Song wrote:
> The dump_mem() will output useless content that exceed the stack
> in __die(), because sp will exceed the top of stack when the
> CONFIG_VMAP_STACK=y.
However, regs->ARM_sp _is_ the value of the stack pointer of the parent
context when the exception was taken, and is the correct value to start
printing the stack from.
If the first few prints are unreadable, then that's useful information.
> Insufficient stack space to handle exception!
> Task stack: [0xf09dc000..0xf09de000]
> IRQ stack: [0xf0800000..0xf0802000]
> Overflow stack: [0xc210e000..0xc210f000]
> Internal error: kernel stack overflow: 0 [#1] SMP ARM
> Modules linked in:
> CPU: 0 PID: 81 Comm: sh Not tainted 5.18.0-rc3 #4
> Hardware name: ARM-Versatile Express
> PC is at mmioset+0x20/0xa8
> LR is at recursive_loop+0x34/0x9c
> pc : [<c0777080>] lr : [<c0a90c6c>] psr: 20000013
> sp : f09dbf48 ip : f09dbf4c fp : 00219644
> ...
> Stack: (0xf09dbf48 to 0xf09de000)
> bf40: ???????? ???????? ???????? ???????? ???????? ????????
> bf60: ???????? ???????? ???????? ???????? ???????? ???????? ???????? ????????
> bf80: ???????? ???????? ???????? ???????? ???????? ???????? ???????? ????????
> bfa0: ???????? ???????? ???????? ???????? ???????? ???????? ???????? ????????
> bfc0: ???????? ???????? ???????? ???????? ???????? ???????? ???????? ????????
> bfe0: ???????? ???????? ???????? ???????? ???????? ???????? ???????? ????????
> c000: 57ac6e9d 00000000 00000000 00000000 00000000 00000000 00000000 00000000
The above is useful information - it tells us that 0xf09dbf48 to
0xf09dc000 fault when accessed.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-04-18 8:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 3:45 [PATCH] ARM: fix the incorrect value of sp in __die() Yuanzheng Song
2022-04-18 8:03 ` Russell King (Oracle) [this message]
2022-04-18 8:36 ` songyuanzheng
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=Yl0bNhQwwnclGKKX@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=ebiederm@xmission.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=songyuanzheng@huawei.com \
--cc=wangkefeng.wang@huawei.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