Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp24341lqs; Mon, 4 Mar 2024 13:43:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWIo3KEudxzPu/Gw5T3NnkPRZy5IO3Rp98EaxdYZMXLQdFb+H79LA7xesVF4oA1oF4hz0oxRMVOZ+67M2cmnC1dajav9+xzWgVGdwx4YA== X-Google-Smtp-Source: AGHT+IGdstuFzCw8iUhxqjpGHR+QaEbltUc9b7I4afR1EEtl9b2SkcplT9jouGmVgHeyeIls1/UD X-Received: by 2002:a05:6214:b14:b0:68c:7ca9:8e52 with SMTP id u20-20020a0562140b1400b0068c7ca98e52mr99974qvj.56.1709588634550; Mon, 04 Mar 2024 13:43:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709588634; cv=pass; d=google.com; s=arc-20160816; b=BZVJ4h6rxQ0Dl7s8rNRddyoEGCIiJKMHg/VluzWIs5gt18RPaloEu+gCJjc5fwePgo gI+J/gSJpFIxKfsGv9DIVSfgijZBzIhn1FJM4mf//DbO3e5ri1CMRxRRdfQXAZEpXYFF MscSM1Hw0XTHUN+2FhejTy37u0Jhez9f/7Xj801lTo9yvL+3cTJZL6qDYGFrXeyqKxK8 id/vyRO7xHNT4hctmfzpqem27uwVVgVTq5Bg+2eOQVcxCW6LGFNTiG79citjIxDziKrj pr/Zi+qbpkuqcOC5alr2wXO+rVt2g2EmmkxsalRtqka1xikWawv3LGO9AcfSZ4YkHxlI cUfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=E1Q94e5EFIOf0PrpzPHEslcyP80xmoYX4L90KOBiz38=; fh=FcPIS6Av8KwHFioYHkN0HELK3Djba2WoNRIITCLqL8s=; b=ILDhZPECJZ2cQzEStVzilQVTriXZA03HRKJsFCHNMk/JHtLux/kAXaeO5oTq0K0s8T onSeLS9wlOICYL3Dx3vLX8zdrXB3i0fpj3B7aT8vWJ0Y+zUst58BO9aOUYNQ09Ahfljq 6k5WdIkzJBEgepqjutiCfeMkMrDyGLs9bQymE+hMw4WEw+DE7+VncW+utFB3xSFFe+CB cDamaJr9hZoHdzGr1XSO5dPmT8GLeQ4QSHUacY5C8zEQIh06kS+cGTrQlgdcwKBrqTkw 9V+V0pcRGms6ASN8pIWlzbj1lruF4+O/dlvu+wHHK9EBgbaW9Cj6LcCMWXtD5T9rLDgP pp5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=U3zf6rNl; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-91322-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91322-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id js4-20020a0562142aa400b0068f62f01575si10447359qvb.257.2024.03.04.13.43.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 13:43:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91322-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=U3zf6rNl; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-91322-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91322-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4B3A81C215E4 for ; Mon, 4 Mar 2024 21:43:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FD6B78B69; Mon, 4 Mar 2024 21:43:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="U3zf6rNl" Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 557418F58 for ; Mon, 4 Mar 2024 21:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709588628; cv=none; b=R46T+PlALIMasZiGeAJ4d5jo5pJxDxR5upVnzcMudHKlgN4S8qlOdekH7diR7sBWZ0SW1ZIhClQbS0mO63fY1L7Yd4Jk5k1/aiZd0DhvKCoWFIy9t00STdd4hN2Ge2rzESgX0ubKtrbYmX/Ja9qBYp0Bdde8+vwiYILrjrJ6mY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709588628; c=relaxed/simple; bh=gEIk3KNMIpuofqC+pRyvAHlCkEZ7jlcfI4PEv6Mt9Fo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MbuNV0v1Ph1v+pZbUe7o64v5UNj58LTar+5YmGyIZ5q1mj3kgaNqrQK9TqIiaJ0iEIRYP23Upo//lxAW80VYAlzgLs/Z+JsE+sQCJlhUYMn6U5pMwjlYm+13V0VPRd4sMEJKGB6QvnLi4rw/C2sWuoL+DixtSl67VnG8Y0OA4LA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=U3zf6rNl; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=E1Q94e5EFIOf0PrpzPHEslcyP80xmoYX4L90KOBiz38=; b=U3zf6rNlW1YXMwSvvbRZuUDWRZ Cl37Wj5eZvXsTJsanH+iaAWqoEpXQDzXg+9Jqeq3cPF/ouGZHidQuGM+vxalE6c9nvoRpmjIQQoLe XO624T7oaQmd6onbC46xoce6QfY32hMNsd+sVDoNSPIqYMZejVixOm382IdZui/m1xK256g4KtJX2 b+vJzUXnP1dfmdlDuHlAMGxmdXHM14L9kx86q2VfGqsdfoN7j+pg4QBfPYzYKTrLHSse/A70H6wyT wf5bXJfau6sm74EEXWM7E9P6xSbreBxezugkZbV+iqq9+wz95PxZ3RDEySFNzCCxjxMjpqNV3pEvi d4Tky9dg==; Received: from [187.90.173.251] (helo=[192.168.1.60]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1rhG5h-0060jN-5a; Mon, 04 Mar 2024 22:43:21 +0100 Message-ID: <15015345-3068-2fb8-aa38-f32acf27e1d0@igalia.com> Date: Mon, 4 Mar 2024 18:43:05 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [RFC] How to test panic handlers, without crashing the kernel Content-Language: en-US To: John Ogness , Jocelyn Falempe , Linux Kernel Mailing List , Daniel Vetter , Andrew Morton , "Peter Zijlstra (Intel)" , Josh Poimboeuf , Arnd Bergmann , Kefeng Wang , Lukas Wunner , Uros Bizjak , Petr Mladek , Daniel Thompson , Douglas Anderson , "Michael Kelley (LINUX)" Cc: "dri-devel@lists.freedesktop.org" , David Airlie , Thomas Zimmermann References: <266579a9-fde6-40ff-b13d-fb2312db406c@redhat.com> <87edcpn1l3.fsf@jogness.linutronix.de> From: "Guilherme G. Piccoli" In-Reply-To: <87edcpn1l3.fsf@jogness.linutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 CPUs via NMI (similar to kdb) and then calls the panic > notifiers. And finally releases everything back to normal. That might > produce a fairly realistic panic situation and should be fairly > non-destructive (depending on what the notifiers do and how long they > take). > Hi Jocelyn / John, one concern here is that the panic notifiers are kind of a no man's land, so we can have very simple / safe ones, while others are destructive in nature. An example of a good behaving notifier that is destructive is the Hyper-V one, that destroys an essential host-guest interface (called "vmbus connection"). What happens if we trigger this one just for testing purposes in a debugfs interface? Likely the guest would die... [+CCing Michael Kelley here since he seems interested in panic and is also expert in Hyper-V, just in case my example is bogus.] So, maybe the problem could be split in 2: the non-notifiers portion of the panic path, and the the notifiers; maybe restricting the notifiers you'd run is a way to circumvent the risks, like if you could pass a list of the specific notifiers you aim to test, this could be interesting. Let's see what the others think and thanks for your work in the DRM panic notifier =) Cheers, Guilherme