From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14920 invoked by alias); 10 Mar 2005 05:01:54 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14832 invoked from network); 10 Mar 2005 05:01:45 -0000 Received: from unknown (HELO e3.ny.us.ibm.com) (32.97.182.143) by sourceware.org with SMTP; 10 Mar 2005 05:01:45 -0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e3.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j2A51jLU015171 for ; Thu, 10 Mar 2005 00:01:45 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j2A51inA064918 for ; Thu, 10 Mar 2005 00:01:44 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j2A51fc9023853 for ; Thu, 10 Mar 2005 00:01:44 -0500 Received: from wks126478wss.in.ibm.com (wks126478wss.in.ibm.com [9.182.14.178]) by d01av02.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j2A51EXK023133; Thu, 10 Mar 2005 00:01:15 -0500 Subject: Re: [Fastboot] Re: Query: Kdump: Core Image ELF Format From: Vivek Goyal To: "Eric W. Biederman" Cc: Andrew Morton , Dave Anderson , gdb , fastboot , lkml In-Reply-To: References: <1110286210.4195.27.camel@wks126478wss.in.ibm.com> <1110350629.31878.7.camel@wks126478wss.in.ibm.com> Content-Type: text/plain Date: Thu, 10 Mar 2005 05:01:00 -0000 Message-Id: <1110430955.3574.11.camel@wks126478wss.in.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00091.txt.bz2 On Wed, 2005-03-09 at 07:17 -0700, Eric W. Biederman wrote: > Vivek Goyal writes: > > > On Tue, 2005-03-08 at 11:00 -0700, Eric W. Biederman wrote: > > That sounds good. But we loose the advantage of doing limited debugging > > with gdb. Crash (or other analysis tools) will still take considerable > > amount of time before before they are fully ready and tested. > > > > How about giving user the flexibility to choose. What I mean is > > introducing a command line option in kexec-tools to choose between ELF32 > > and ELF64 headers. For the users who are not using PAE systems, they can > > very well go with ELF32 headers and do the debugging using gdb. > > > > This also requires, setting the kernel virtual addresses while preparing > > the headers. KVA for linearly mapped region is known in advance and can > > be filled at header creation time and gdb can directly operate upon this > > region. > > I have no problems decorating the ELF header you are generating > in user space with virtual addresses assuming we can reliably > get that information. And before a kernel crashes looks like a reasonable > time to ask that question. I don't currently see where you could > derive that information. I want to fill the virtual addresses of linearly mapped region. That is physical addresses from 0 to MAXMEM (896 MB) are mapped by kernel at virtual addresses PAGE_OFFSET to (PAGE_OFFSET + MAXMEM). Values of PAGE_OFFSET and MAXMEM are already known and hard-coded. I think I used the terminology kernel virtual address and that is adding to the confusion. Kernel virtual addresses are not necessarily linearly mapped. What I meant was kernel logical addresses whose associated physical addresses differ only by a constant offset. > > Beyond that I prefer a little command line tool that will do the > ELF64 to ELF32 conversion and possibly add in the kva mapping to > make the core dump usable with gdb. Doing it in a separate tool > means it is the developer who is doing the analysis who cares > not the user who is capturing the system core dump. > > But I do agree that it a use case worth solving. > > Eric >