public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Zhen Lei <thunder.leizhen@huawei.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Russell King <linux@armlinux.org.uk>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <patches@armlinux.org.uk>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Subject: [PATCH 0/2] arm: Replace this_cpu_* with raw_cpu_* in panic_bad_stack()
Date: Thu, 25 Aug 2022 14:31:52 +0800	[thread overview]
Message-ID: <20220825063154.69-1-thunder.leizhen@huawei.com> (raw)

I'm analyzing a strange problem these days, and I find that there are some areas in
panic_bad_stack() that can be optimized. That is, replace this_cpu_* with raw_cpu_* .

Just optimization, it is unlikely to cause the following exception nesting, because of
"lr : __bad_stack+0x88/0x8c".

[20220819163739]Unable to handle kernel paging request at virtual address f7ffff94901b8048
[20220819163739]Mem abort info:
[20220819163739]  ESR = 0x96000004
[20220819163739]  EC = 0x25: DABT (current EL), IL = 32 bits
[20220819163739]  SET = 0, FnV = 0
[20220819163739]  EA = 0, S1PTW = 0
[20220819163739]Data abort info:
[20220819163739]  ISV = 0, ISS = 0x00000004
[20220819163739]  CM = 0, WnR = 0
[20220819163739][f7ffff94901b8048] address between user and kernel address ranges
[20220819163739]Internal error: Oops: 96000004 [#1] PREEMPT SMP
[20220819163739]Modules linked in: ...
[20220819163740]CPU: 2 PID: 1272 Comm: 00002SWDLMain Tainted: G        W  O      5.10.0 #1
[20220819163740]Hardware name: hisilicon,hi1213-fpga (DT)
[20220819163740]pstate: 000003c5 (nzcv DAIF -PAN -UAO -TCO BTYPE=--)
[20220819163740]pc : __bad_stack+0x4c/0x8c
[20220819163740]lr : __bad_stack+0x88/0x8c
[20220819163740]sp : ffffff953ffa8160
[20220819163740]x29: f7ffff953ffa8120 x28: f7ffff94901b8040 
[20220819163740]x27: ffffffeb72ea6940 x26: ffffffebeee6cf10 
[20220819163740]x25: ffffffebef627000 x24: 0000000000000000 
[20220819163740]x23: 00000000600003c5 x22: f7ffffebeee11904 
[20220819163740]x21: ffffff953ffa82b0 x20: 0000007fffffffff 
[20220819163740]x19: f7ffffc0133ab898 x18: 0000000000000000 
[20220819163740]x17: 0000000000000000 x16: ffffffebef32f0a0 
[20220819163740]x15: 00000000624057a0 x14: 953325a7da350fb3 
[20220819163740]x13: 09bbbe32ce2b3c11 x12: c15a0e2d1991997b 
[20220819163740]x11: 0bc8be839e7850d0 x10: cafa1cb223203045 
[20220819163740]x9 : f36bed299e5840dc x8 : ffffffc0133aba48 
[20220819163740]x7 : ffffff953b1b0480 x6 : ffffffebef3e1000 
[20220819163740]x5 : 0000000000000000 x4 : 0000000000000001 
[20220819163740]x3 : f7ffffc0133ab750 x2 : 0000000000000025 
[20220819163740]x1 : 0000000096000004 x0 : ffffff953ffa8160 
[20220819163740]Call trace:
[20220819163740] __bad_stack+0x4c/0x8c
[20220819163740]Code: a90d6ffa a90e77fc 910543f5 d538411c (f9400794) 
[20220819163740]---[ end trace 07532bfa2c24851c ]---
[20220819163740]Kernel panic - not syncing: Oops: Fatal exception


Zhen Lei (2):
  arm64/traps: Replace this_cpu_* with raw_cpu_* in panic_bad_stack()
  ARM: Replace this_cpu_* with raw_cpu_* in panic_bad_stack()

 arch/arm/kernel/traps.c   | 4 ++--
 arch/arm64/kernel/traps.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-08-25  6:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25  6:31 Zhen Lei [this message]
2022-08-25  6:31 ` [PATCH 1/2] arm64/traps: Replace this_cpu_* with raw_cpu_* in panic_bad_stack() Zhen Lei
2022-08-25 13:29   ` Mark Rutland
2022-08-26  3:25     ` Leizhen (ThunderTown)
2022-08-25  6:31 ` [PATCH 2/2] ARM: " Zhen Lei
2022-08-25 13:32   ` Mark Rutland
2022-08-26  6:22     ` Leizhen (ThunderTown)

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=20220825063154.69-1-thunder.leizhen@huawei.com \
    --to=thunder.leizhen@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=patches@armlinux.org.uk \
    --cc=will@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