From: Jocelyn Falempe <jfalempe@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
John Ogness <john.ogness@linutronix.de>,
Daniel Vetter <daniel@ffwll.ch>,
Andrew Morton <akpm@linux-foundation.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Lukas Wunner <lukas@wunner.de>, Uros Bizjak <ubizjak@gmail.com>,
"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
Uros Bizjak <ubizjak@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
David Airlie <airlied@redhat.com>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [RFC] How to test panic handlers, without crashing the kernel
Date: Fri, 1 Mar 2024 12:14:12 +0100 [thread overview]
Message-ID: <266579a9-fde6-40ff-b13d-fb2312db406c@redhat.com> (raw)
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
next reply other threads:[~2024-03-01 11:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 11:14 Jocelyn Falempe [this message]
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
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=266579a9-fde6-40ff-b13d-fb2312db406c@redhat.com \
--to=jfalempe@redhat.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gpiccoli@igalia.com \
--cc=john.ogness@linutronix.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=peterz@infradead.org \
--cc=tzimmermann@suse.de \
--cc=ubizjak@gmail.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
all inboxes | Powered by JetHome®