From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0F51385D9B for ; Fri, 17 Jul 2026 13:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784293582; cv=none; b=hZyVYSIMg61BREbVOnFMH6oYlB21pUXWf9ATYtekDnB2heV+bbNxgEbcSY5XXahsHd+Ctn7ArbA5YWt3pnjoAc0vHWckiNucf1eVudSwZq3SIR/n1AWMAbFWPc5Y3TJpg0VC+WUSjB4tYQRRX7gGyKBMnQ9YgqLabxEbGSz6Ado= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784293582; c=relaxed/simple; bh=ooXfUpcLqBkSF/536GUFVDSK79x2D5ZUEblkQoD1qDc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AVYQZMOoLh8ccDo8vCABA8YMyJW5wVcM9JvGnbQPNmUuXY9yxzCPFiNikxrFszt3V53TEJ4XYW7gBjtP3Tg7JlsPpqve/bqj1Sz72MWVNDW6x6eUPRHuf34Y6exvUUWeKybdpUdI47MP+cWLD9vzxhWakaYpAXwBlsOfCAhPkRk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=PmcEtaQq; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="PmcEtaQq" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-47f3b39f2a1so3149366f8f.2 for ; Fri, 17 Jul 2026 06:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1784293579; x=1784898379; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=AwD3uL+AAVQiRMtendf4o0KrWxG2CpQ1isuuZXC/FbQ=; b=PmcEtaQqZvl5LiKiwrxy3S4+Jv2xkJY2P8T/A+fgh3asupoxGT0ZcNHxjHTVBkwnFB fSf2Z94IWWY1CCRzxlLopMpxNxh7mU4QD0YLCmOeTuCFvsZJ024yOCl8oRpyIjJG+hUG h3IXH+QTwfhQTLRHGUJP+sAZRm8sIKTn7IKVa3MkgW/S9qUDBeB9iJo83HmzDFeJphK0 3nvZmuoOnDN/u6xlNaMDGXvhegv7sxRQQnqSt0IWbcXxCDqRztSt6NVKCODUuZltbiWI ql4rOMfusI5bNHObeLwFtzf1GTtRiTQyeomlFgCatzEDxOUupbAxwWOmpU9Eqfpcao7m SeUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784293579; x=1784898379; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=AwD3uL+AAVQiRMtendf4o0KrWxG2CpQ1isuuZXC/FbQ=; b=mxdvRCNegoRWctqD09ppNKKsirUO4ZRwyti4+m4IjqP9odx95nqYgE/Mbxp6Sr61xe 57y7XtYtCWxb3x5ueDFCxL5UGYw/ExOFO7XM9xhGDxkDqkPs5+kFJyZexMyp6h1AkX77 ak1bpbZj3HBRptrL50hVWh/0RwfYxAT1ky3DrzFx1/Wjof3lYyOdBDeQGS9lYKlE2Bbj pYroUG3z9VudgWLnA2OIeUwgeGY67dKql3yQB+emrJV5cbDMzn4r7bi6PF1sBc3XthL8 XbRbrxCby0dBeC4X6YlluWM129yYNiCsfEHRDS0jOYF65wfx51CCKbLN6WNY2aD7eg2c Iccg== X-Forwarded-Encrypted: i=1; AHgh+RpM/aZKAkxTUPn/THBpdDsktvzwXXvtpjUJyiUAIX287gcuJoimwZDF5Y6Evz1rIOnvNmJtWYdSfbNnwY8=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3ZOiQaTKQsw9H4esDFpYygZ503ZoF9rY39YgFL2mkfOqwa2Pn ejPGhf/6WEJXEDtzp8SAr+b4N6qngOlEXCI+K5D4ZNCcfi0ITuWrgxA4XtwZjpArkkU= X-Gm-Gg: AfdE7cmp87x3xi3FLBwQxBmPPKHhyKA67yPq9bscgtKTLxNbSuRyxIDYq1uQMea58sL Zngra+S4Kg6yc+IjXuoMdpGtyaAWKXe3o1yb09cECslHJvNIsgJcSBEtu6e7F+IkDcWz/ADmkGM UIZbNmZptYnXn+Qe9PbyJg0A9a11/bQVUJ4tbjHP46brMentxIIGPn7vzuE1BZMlE46e2FR0dWu tsXhbkf6403AxZj//WyL2VIq+XfT20msoPPnRB+16ztI62h5hrWFI9CKGS/Rze6ZeK5quwMqsjU kNdhQa61DeC3cyVQAFaJyl3IHRbzGecsh1KfKQNcQj3AleLqdeX7S0lZrSIaMJGPAm+gZ65qmT9 lphL5XhWt1ppebaghkPLSQ3oWC12Nbq2S1t3PTWDOalGA7dswahgZeZrP1XaqZexMAV0g6t21TM w3zV93 X-Received: by 2002:a05:600c:3154:b0:493:ee2b:c8c7 with SMTP id 5b1f17b1804b1-4954a3e6e4bmr27741575e9.4.1784293577105; Fri, 17 Jul 2026 06:06:17 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49548e075d4sm38407825e9.1.2026.07.17.06.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2026 06:06:16 -0700 (PDT) Date: Fri, 17 Jul 2026 15:06:14 +0200 From: Petr Mladek To: Bradley Morgan Cc: akpm@linux-foundation.org, baoquan.he@linux.dev, feng.tang@linux.alibaba.com, gregkh@linuxfoundation.org, arnd@arndb.de, corbet@lwn.net, rdunlap@infradead.org, gpiccoli@igalia.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/4] panic: add a pre kdump notifier list Message-ID: References: <20260711002253.1115-1-include@grrlz.net> <20260711002253.1115-2-include@grrlz.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260711002253.1115-2-include@grrlz.net> On Sat 2026-07-11 00:22:50, Bradley Morgan wrote: > When a crash kernel is loaded, panic() jumps to it before the panic > notifiers run. A hypervisor or firmware therefore never learns that > the guest panicked: the Hyper-V host never receives the crash > registers, a Google gsmi firmware log entry is dropped, a pvpanic > device never signals the host, and an AMD SEV-SNP guest skips the > firmware and IOMMU shutdown. Fleet alerting, availability tracking, > and crash logging all miss the event. > > The only escape hatch today is crash_kexec_post_notifiers, but it runs > the entire legacy notifier list before the kdump. That list carries > slow callbacks, IPMI being the obvious one because it talks to a BMC, > so enabling it delays every crash dump on the machine. Hyper-V forces > it on anyway and penalizes every kdump for the sake of one upcall; > this series also removes the forcing that SEV-SNP added for the same > reason, giving SNP hosts the normal early crash kexec back. > > Add a small dedicated list that always runs before crash kexec. The > list head stays private and registration goes through a function, > because the callbacks on this list have a strict contract and an API > is how you enforce one. The list lives in its own file, not in panic.c, > so the contract can carry a MAINTAINERS entry and the existing panic > code does not have to move. > > Priorities order the list like any atomic notifier chain. The header > documents that they are reserved for callbacks that must run last, for > example because they may not return or because they tear down a > transport that other callbacks still need. > > The notify path walks the chain by hand and names each callback on the > console before invoking it. Running anything before the crash kexec is > a reliability trade, if an upcall hangs or faults and costs us the > crash dump, the console identifies the culprit instead of leaving a > machine that silently never rebooted into the kdump kernel. Callback > return values are deliberately ignored, and a nested panic resumes the > walk after the callback that was running instead of refaulting on it. This is a long blob of text. I refuse to find the details there. I miss a clear summary how this list is different from atomic_notifier_chain and why we need it. My understanting is that there two "main" differences. The new list: + ignores errors. But this might be achieved by requesting that panic() notifiers should always return 0. + skips already proceed notifiers during a nested panic. But this is a rather theoretical corner case. IMHO, it not worth the effort. Did I miss anything, please? Best Regards, Petr