Received: by 10.213.65.68 with SMTP id h4csp772174imn; Tue, 27 Mar 2018 08:29:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+jNwtIaPrW0/WLYSi7Zy64w1j5aAsYudNH0uwQhyKfBtT7RBtzwuETSzsIzmMWGbtQwmcx X-Received: by 10.101.75.66 with SMTP id k2mr6850283pgt.66.1522164586644; Tue, 27 Mar 2018 08:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522164586; cv=none; d=google.com; s=arc-20160816; b=Yf41Jr4TqjP6NSRX0+esYeaZjT+0AiF9JQVpUZKqPAm3kPCIfKYJ2WMol8RsI0bIiA wtKTEcxLbetxkzlJNkr+hfk24jVElpmOS+6iNDhLIxil4fWh9sb7wg2dO91Uu+Pm/z1P oBSTviXSVDMIpf+ZE8fzSgPBIJHVqGRcNQrY4+kgwAUEYy9X08DstxBFyTjGmEWEtNU0 fLl28EQY5uRxFo9izG/EnpOITEvO9y2e9PCFSidhUb+YM4Y3fDsKio/wCufZ2B+VNRYS 6fpEvoIX4fgGWSWXrfSBWVpIXfiPF6kubF3duOCHZKXypGvOo0jigP65uInxWT1klmtl 5LWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ZWy/B2X4o9GyQrwXLk+zoeccZRAgT6wQO7C09IVkQlw=; b=J6g7Ko/cTGUrPiCa74v3NC9LTzYf6J/dO8+indWbIt3Ac10KPrIXxUN9LcReF5oYPu bPxGQZ0omGKjoYLO20VpAXtR1oT+RluhCqT9XWczVfC7J0MSfZlXPnQE9I9rZUiHD2uf zPiMt5wnKK1wLGnciPbRavTYgYjuIOTGSWOYoBHEylSuUC9LyJ6h7uOf055ftzROrjik uItK2lHoXrDB0ji/YdUUtFEP5jAVQiw9iKZNKrR6gVXOmTKr4UAOsrhl4zuBCqSRs8Hw sfNK0ktGWK3kWZOLqLI47zdr+iggT2uCxOjVKKwVyRuot10Y7ZoA0++JsGTyhODV7QX8 ZMTQ== 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 k8-v6si1452401pli.7.2018.03.27.08.29.32; Tue, 27 Mar 2018 08:29:46 -0700 (PDT) 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 S1752507AbeC0P20 (ORCPT + 99 others); Tue, 27 Mar 2018 11:28:26 -0400 Received: from stargate.chelsio.com ([12.32.117.8]:62857 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbeC0P2Y (ORCPT ); Tue, 27 Mar 2018 11:28:24 -0400 Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w2RFS3aR018009; Tue, 27 Mar 2018 08:28:04 -0700 Date: Tue, 27 Mar 2018 20:57:16 +0530 From: Rahul Lakkireddy To: "Eric W. Biederman" Cc: "netdev@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "davem@davemloft.net" , "viro@zeniv.linux.org.uk" , "stephen@networkplumber.org" , "akpm@linux-foundation.org" , "torvalds@linux-foundation.org" , Ganesh GR , Nirranjan Kirubaharan , Indranil Choudhury Subject: Re: [PATCH net-next v2 0/2] kernel: add support to collect hardware logs in crash recovery kernel Message-ID: <20180327152715.GA18097@chelsio.com> References: <87muyxlctn.fsf@xmission.com> <20180326134539.GA15852@chelsio.com> <87k1txfyj5.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k1txfyj5.fsf@xmission.com> 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 On Tuesday, March 03/27/18, 2018 at 18:47:34 +0530, Eric W. Biederman wrote: > Rahul Lakkireddy writes: > > > On Saturday, March 03/24/18, 2018 at 20:50:52 +0530, Eric W. Biederman wrote: > >> > >> Rahul Lakkireddy writes: > >> > >> > On production servers running variety of workloads over time, kernel > >> > panic can happen sporadically after days or even months. It is > >> > important to collect as much debug logs as possible to root cause > >> > and fix the problem, that may not be easy to reproduce. Snapshot of > >> > underlying hardware/firmware state (like register dump, firmware > >> > logs, adapter memory, etc.), at the time of kernel panic will be very > >> > helpful while debugging the culprit device driver. > >> > > >> > This series of patches add new generic framework that enable device > >> > drivers to collect device specific snapshot of the hardware/firmware > >> > state of the underlying device in the crash recovery kernel. In crash > >> > recovery kernel, the collected logs are exposed via /sys/kernel/crashdd/ > >> > directory, which is copied by user space scripts for post-analysis. > >> > > >> > A kernel module crashdd is newly added. In crash recovery kernel, > >> > crashdd exposes /sys/kernel/crashdd/ directory containing device > >> > specific hardware/firmware logs. > >> > >> Have you looked at instead of adding a sysfs file adding the dumps > >> as additional elf notes in /proc/vmcore? > >> > > > > I see the crash recovery kernel's memory is not present in any of the > > the PT_LOAD headers. So, makedumpfile is not collecting the dumps > > that are in crash recovery kernel's memory. > > > > Also, are you suggesting exporting the dumps themselves as PT_NOTE > > instead? I'll look into doing it this way. > > Yes. I was suggesting exporting the dumps themselves as PT_NOTE > in /proc/vmcore. I think that will allow makedumpfile to collect > your new information without modification. > If I export the dumps themselves as PT_NOTE in /proc/vmcore, can the crash tool work without modification; i.e can crash tool extract these notes? Thanks, Rahul