From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [Xen-devel] incorrect layout of globals from head_64.S during kexec boot Date: Fri, 6 Jul 2012 15:31:05 +0200 Message-ID: <20120706133105.GA20600@aepfle.de> References: <20120705210607.GA26908@aepfle.de> <20120706084120.GA31219@router-fw-old.local.net-space.pl> <20120706120750.GA8970@aepfle.de> <4FF6FCA9020000780008E0BB@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4FF6FCA9020000780008E0BB-ce6RLXgGx+vWGUEhTRrCg1aTQe2KTcn/@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kexec-bounces-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Errors-To: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Jan Beulich Cc: xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org, kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Daniel Kiper List-Id: xen-devel@lists.xenproject.org On Fri, Jul 06, Jan Beulich wrote: > >>> On 06.07.12 at 14:07, Olaf Hering wrote: > > But adding some debug to inspect > > *output in parse_elf() shows that the second entry in program headers is > > already shifted by 44 bytes in my testing, the others are shifted by the > > same amount. > > Unfortunately it's not clear what is shifted - the printout below > looks just fine. Also, from your first mail I understood that the shift > there was by an amount not divisible by 4 - does that amount vary? The memory location of the second LOAD entry (the .data section) is wrong. It should be at 0x1c00000, but in fact its content starts at 0x1c0002c. I looked at the x86 boot code, the vmlinux is gzipped and placed as binary blob, which is then extracted by decompress(). I will cleanup my debug changes and post the output. Olaf > > Program Headers: > > Type Offset VirtAddr PhysAddr FileSiz > > MemSiz Flg Align > > LOAD 0x200000 0xffffffff81000000 0x0000000001000000 0xa3b000 > > 0xa3b000 R E 0x200000 > > LOAD 0xe00000 0xffffffff81c00000 0x0000000001c00000 0x05b0e8 > > 0x05b0e8 RW 0x200000 > > LOAD 0x1000000 0x0000000000000000 0x0000000001c5c000 0x012c40 > > 0x012c40 RW 0x200000 > > LOAD 0x106f000 0xffffffff81c6f000 0x0000000001c6f000 0x087000 > > 0x702000 RWE 0x200000 > > NOTE 0x82d5bc 0xffffffff8162d5bc 0x000000000162d5bc 0x00017c > > 0x00017c 0x4