Received: by 10.223.185.116 with SMTP id b49csp491781wrg; Tue, 20 Feb 2018 02:57:44 -0800 (PST) X-Google-Smtp-Source: AH8x224fSAtVgcenFsHBtYNxz3HQtSpTXiDLeJwwixKXm1rv0ugLVUm7NG+ixK7TILD9UGIDJT9o X-Received: by 2002:a17:902:5788:: with SMTP id l8-v6mr16507127pli.56.1519124264711; Tue, 20 Feb 2018 02:57:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519124264; cv=none; d=google.com; s=arc-20160816; b=kpuYB0n6J5Kc/TEh4Pt9LcjN6jPMhgzZ8MReXO1KuDAqH622HSqZF6dCu2sCRhaAkx +QNo7ATDRwnM5cDrXlRGf6n65DDwyREJFUdJFyD8z7sSvsjQEpXLjlEbe7RNZv6MQpPt ZniRmAArZgSrYWq2e6MoJI6MjQ1ZPG+ApcBdFF1ycqdsuvUE/+8ItFVhyyhVgI2qmgF6 Ngra/gUDu01q6bYCfEFBL/F2fPcDJlSDLA3BAqO2E7P+zd7N3cLcB3L2FbVedQMRs1Uv F6N4Sm6Ukqx8PMhPumkjHNYJodza8oIleptY39kc9QX2LXhoVdp+7bc9ZMf9xEhkamVc v36A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=eSgehOIoGK0BgqqQzETkm25KIxc7ISpMmQd8z0B2wjM=; b=orFZtkcrfDaSuvEc9Tv4EviK5BFnBbNpCzRyh+eeCGh77th59muB3d9W17mj6s6Fx0 GS6t8+dBcCbJkvCQbLlh9Q2yWBpQYvfcZfRIQ3gSoCP18bH53zA/aiq7I3d009Ri6KGk nkgM9UrZ5f9y0ZEi/Vf/z21nKySlbTGGOLYEgR4bl+uO/T7OvF+wqdf2VkihwW37kFBR B9S2Ortn24ZonO0dk8YcE5LCxc8cqV6wdau2aoWD62ccxkEkOUbMbjQCWld1N9oOjNV2 MYAyVL6yjAc+IwfFr7SCWTkBXYiuzGKp7GErgGihmzQGzqMT0AUUhOgLvkI3zj7SIdc1 a3BQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c66si780820pfc.416.2018.02.20.02.57.30; Tue, 20 Feb 2018 02:57:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751459AbeBTK4u (ORCPT + 99 others); Tue, 20 Feb 2018 05:56:50 -0500 Received: from stargate.chelsio.com ([12.32.117.8]:41535 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbeBTK4t (ORCPT ); Tue, 20 Feb 2018 05:56:49 -0500 Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w1KAuf2Q004031; Tue, 20 Feb 2018 02:56:42 -0800 Date: Tue, 20 Feb 2018 16:26:14 +0530 From: Rahul Lakkireddy To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org, davem@davemloft.net, ganeshgr@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com, rahul.lakkireddy@chelsio.com Subject: Appending firmware/hardware dump to vmcore during kernel panic Message-ID: <20180220105613.GA9766@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, We have a requirement to collect firmware/hardware state of the underlying NIC during kernel panic. We are doing this in cxgb4 driver, using panic notifier list [1]. cxgb4 registers a callback function to the panic notifier list, which gets invoked during kernel panic. In the callback function, firmware/hardware dump is collected into pre-allocated buffer and then extracted later from the vmcore, for post-analysis. Is this approach of using panic notifier correct? Any suggestions are much appreciated. Thanks, Rahul [1] https://patchwork.ozlabs.org/patch/873830/