Re: [RFC] How to test panic handlers, without crashing the kernel

2024-03-07 Thread Guilherme G. Piccoli
On 07/03/2024 14:22, Jocelyn Falempe wrote: > [...] > > For drm_panic, I changed the way the debugfs is calling the drm_panic > functions in the last version: > https://patchwork.freedesktop.org/patch/581845/?series=122244=9 > > It doesn't use the panic notifier list, but create a file for each

Re: [RFC] How to test panic handlers, without crashing the kernel

2024-03-07 Thread Jocelyn Falempe
On 05/03/2024 18:50, Guilherme G. Piccoli wrote: On 05/03/2024 13:52, Jocelyn Falempe wrote: [...] Or maybe have two lists of panic notifiers, the safe and the destructive list. So in case of fake panic, we can only call the safe notifiers. I tried something like that:

Re: [RFC] How to test panic handlers, without crashing the kernel

2024-03-05 Thread Guilherme G. Piccoli
On 05/03/2024 13:52, Jocelyn Falempe wrote: > [...] > Or maybe have two lists of panic notifiers, the safe and the destructive > list. So in case of fake panic, we can only call the safe notifiers. > I tried something like that:

Re: [RFC] How to test panic handlers, without crashing the kernel

2024-03-05 Thread Jocelyn Falempe
On 05/03/2024 17:23, Michael Kelley wrote: From: Guilherme G. Piccoli Sent: Monday, March 4, 2024 1:43 PM On 04/03/2024 18:12, John Ogness wrote: [...] 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

Re: [RFC] How to test panic handlers, without crashing the kernel

2024-03-05 Thread Jocelyn Falempe
On 04/03/2024 22:12, John Ogness wrote: [Added printk maintainer and kdb folks] Hi Jocelyn, On 2024-03-01, Jocelyn Falempe wrote: 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

RE: [RFC] How to test panic handlers, without crashing the kernel

2024-03-05 Thread Michael Kelley
From: Guilherme G. Piccoli Sent: Monday, March 4, 2024 1:43 PM > > On 04/03/2024 18:12, John Ogness wrote: > > [...] > >> 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. > > > >

Re: [RFC] How to test panic handlers, without crashing the kernel

2024-03-04 Thread Guilherme G. Piccoli
On 04/03/2024 18:12, John Ogness wrote: > [...] >> 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. > > I'm wondering if a "fake panic" can be implemented that quiesces all the > other

Re: [RFC] How to test panic handlers, without crashing the kernel

2024-03-04 Thread John Ogness
[Added printk maintainer and kdb folks] Hi Jocelyn, On 2024-03-01, Jocelyn Falempe wrote: > 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(_notifier_list, ...), but it has

[RFC] How to test panic handlers, without crashing the kernel

2024-03-01 Thread Jocelyn Falempe
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(_notifier_list, ...), but it has the side effect of calling all other panic notifiers registered. So Sima suggested to move