lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 1 Mar 2024 12:14:12 +0100
From: Jocelyn Falempe <jfalempe@...hat.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 John Ogness <john.ogness@...utronix.de>, Daniel Vetter <daniel@...ll.ch>,
 Andrew Morton <akpm@...ux-foundation.org>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 Josh Poimboeuf <jpoimboe@...nel.org>, Arnd Bergmann <arnd@...db.de>,
 Kefeng Wang <wangkefeng.wang@...wei.com>, Lukas Wunner <lukas@...ner.de>,
 Uros Bizjak <ubizjak@...il.com>, "Guilherme G. Piccoli"
 <gpiccoli@...lia.com>, Uros Bizjak <ubizjak@...il.com>
Cc: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
 David Airlie <airlied@...hat.com>, Thomas Zimmermann <tzimmermann@...e.de>
Subject: [RFC] How to test panic handlers, without crashing the kernel

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ