Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750989AbVIUO3z (ORCPT ); Wed, 21 Sep 2005 10:29:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750992AbVIUO3z (ORCPT ); Wed, 21 Sep 2005 10:29:55 -0400 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:52370 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S1750986AbVIUO3y (ORCPT ); Wed, 21 Sep 2005 10:29:54 -0400 To: vgoyal@in.ibm.com Cc: Morton Andrew Morton , Anderson Dave Anderson , Fastboot mailing list , linux kernel mailing list Subject: Re: [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFO to kernel core dumps References: <20050921065633.GC3780@in.ibm.com> From: ebiederm@xmission.com (Eric W. Biederman) Date: Wed, 21 Sep 2005 08:28:32 -0600 In-Reply-To: <20050921065633.GC3780@in.ibm.com> (Vivek Goyal's message of "Wed, 21 Sep 2005 12:26:33 +0530") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2148 Lines: 55 Vivek Goyal writes: > o This patch adds a new note type NT_KDUMPINFO. This note is added with > kernel core dumps generated by kdump. > > o This note mainly communicates the information required by kernel dump > analysis tool "crash" to analyze the kernel core dump. As of now it contains > the pointer to task struct of panicing task and page size. Page size is > irrelevant for i386 but is required for architectures like ia64 and ppc64. > > o gdb is not affected by this change as gdb need not to parse this note. A couple of things. - The name of your note is terribly generic, so it seems a poor choice. - Why do we need to capture the page size at the time of the crash? Isn't the page size a compile time option? Won't sys_getpagesize() get you this information before the crash? Why do we need the kernels page size at all? - Why do you avoid storing the current task on the other cpus? - Can't we derive the current task from the existing register information already captured. If not would a little extra debug information captured at compile time be better? - You don't address the issue of architectural control registers. So you are going to need another note at some point. (Not necessarily a bad thing). > +/* > + * NT_KDUMPINFO can be used to communicate additional information required for > + * kernel core dumps. Additional information includes kernel configuration > + * variables like page size and any other relevant data required by > + * debugger (crash in this case). > +*/ > +struct elf_kdumpinfo > +{ > + char page_shift; /* Page size */ > + struct task_struct *panic_tsk; /* Pointer to panic task_struct */ > +}; > + > #define NT_TASKSTRUCT 4 > #define NT_AUXV 6 > #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ > - > +#define NT_KDUMPINFO 7 /* Used for kernel core dumps */ > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/