mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] How to test panic handlers, without crashing the kernel
@ 2024-03-01 11:14 Jocelyn Falempe
  2024-03-04 21:12 ` John Ogness
  0 siblings, 1 reply; 9+ messages in thread
From: Jocelyn Falempe @ 2024-03-01 11:14 UTC (permalink / raw)
  To: Linux Kernel Mailing List, John Ogness, Daniel Vetter,
	Andrew Morton, Peter Zijlstra (Intel),
	Josh Poimboeuf, Arnd Bergmann, Kefeng Wang, Lukas Wunner,
	Uros Bizjak, Guilherme G. Piccoli, Uros Bizjak
  Cc: dri-devel, David Airlie, Thomas Zimmermann

Hi,

While writing a panic handler for drm devices [1], I needed a way to 
test it without crashing the machine.
So from debugfs, I called 
atomic_notifier_call_chain(&panic_notifier_list, ...), but it has the 
side effect of calling all other panic notifiers registered.

So Sima suggested to move that to the generic panic code, and test all 
panic notifiers with a dedicated debugfs interface.

I can move that code to kernel/, but before doing that, I would like to 
know if you think that's the right way to test the panic code.


The second question is how to simulate a panic context in a 
non-destructive way, so we can test the panic notifiers in CI, without 
crashing the machine. The worst case for a panic notifier, is when the 
panic occurs in NMI context, but I don't know how to simulate that. The 
goal would be to find early if a panic notifier tries to sleep, or do 
other things that are not allowed in a panic context.


Best regards,

-- 

Jocelyn

[1] https://patchwork.freedesktop.org/patch/580183/?series=122244&rev=8


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-07 17:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01 11:14 [RFC] How to test panic handlers, without crashing the kernel Jocelyn Falempe
2024-03-04 21:12 ` John Ogness
2024-03-04 21:43   ` Guilherme G. Piccoli
2024-03-05 16:23     ` Michael Kelley
2024-03-05 16:52       ` Jocelyn Falempe
2024-03-05 17:50         ` Guilherme G. Piccoli
2024-03-07 17:22           ` Jocelyn Falempe
2024-03-07 17:30             ` Guilherme G. Piccoli
2024-03-05 16:31   ` Jocelyn Falempe

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®