[PATCH v2 3/9] arm: Rely on generic printing of preemption model.

Russell King (Oracle) linux at armlinux.org.uk
Tue Feb 11 07:05:38 PST 2025


On Tue, Feb 11, 2025 at 03:52:49PM +0100, Sebastian Andrzej Siewior wrote:
> On 2025-02-10 16:26:56 [+0000], Russell King (Oracle) wrote:
> > > This this applied, die("test") on ARM ends as:
> > > 
> > > [    1.595106] Kernel panic - not syncing: test
> > > [    1.596044] CPU: 3 UID: 0 PID: 1 Comm: swapper/0 Tainted: G        W 6.14.0-rc2-00009-gb80a798df08c-dirty #13 PREEMPT
> > > [    1.596768] Tainted: [W]=WARN
> > > [    1.596946] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 02/02/2022
> > 
> > Hmm. I've no idea what you're testing, what you've quoted makes zero
> > sense to me.
> > 
> > First...
> > 
> > void die(const char *str, struct pt_regs *regs, int err)
> > 
> > is the die function prototype, so it takes a bit more than what you've
> > indicated.
> > 
> > Second, "Kernel panic" suggests that panic() has been called. However,
> > this only happens when die() is called (or more specifically
> > oops_end()) from either interrupt context (in which case we get
> > "Kernel panic - Fatal exception in interrupt") or if panic_on_oops
> > is set ("Kernel panic - Fatal exception").
> > 
> > I don't see a path which would result in
> > "Kernel panic - not syncing: test" to be printed from this path.
> > 
> > Since __die() does not call dump_stack(), we're not going to call
> > dump_stack_print_info() from __die(), so I don't think it's appropriate
> > to remove this information.
> 
> Okay. Let me try again with a stack overflow during boot. With the
> series:
> 
> | Freeing unused kernel image (initmem) memory: 2048K
> | 8<--- cut here ---
> | Unable to handle kernel paging request at virtual address df82a000 when write
> | [df82a000] *pgd=80000040007003, *pmd=41487003, *pte=00000000
> | Internal error: Oops: a07 [#1] SMP ARM
> | Modules linked in:
> | CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G        W          6.14.0-rc2-00009-gdca8d546a8a3-dirty #16 PREEMPT

Got it. Printed from __die() -> __show_regs() -> show_regs_print_info()
-> dump_stack_print_info().

Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list