[Crash-utility] Re: crash-4.0-4.3 and linux-2.6.22.1-20.fc7
Dave Anderson
anderson at redhat.com
Mon Jul 23 17:43:58 UTC 2007
Andi Kleen wrote:
> > > Using the latest F7 kernel and crash I'm getting the following
> > > error:
> > > WARNING: cannot read linux_banner string
> > > crash: /usr/lib/debug/lib/modules/2.6.22.1-20.fc7/vmlinux and
> > > /dev/crash do not match!
> > > I've tried both crash and crash -f with no luck.
> > > I've search the mailing list and was unable to find any
> > > thing talked about this problem... So I'm thinking this
> > > may not be a known problem... If it is, please let me know
> > > otherwise does anybody have idea what the problem could be?
> > > tia,
> > > steved.
> > >
> >
> > This elephant still remains in the room...
> >
> > I can reproduce it with a 2.6.21-1.3194.fc7 kernel, which
> > I believe has 2.6.22 stuff backported to it.
>
> Don't know about the Fedora kernel, but at least in mainline
> __pa/__va still work as before for i386/x86-64. It's a single
> add/sub on i386 and on x86-64 similar, but with different ranges
> for kernel text vs the other kernel memory.
>
> The load address is variable now, but still has a default
> set at compile time in CONFIG.
>
> What might have changed when you enable the relocatable kernel
> is that the ELF addresses in the vmlinux are different. But
> at runtime there is no difference.
>
> -Andi
Vivek Goyal wrote:
> Hi Dave,
>
> Sorry, could not reply on Friday.
>
> This looks weared. Only one possible theory comes to mind. In FC7 kernels
> following should be config variables.
>
> CONFIG_PHYSICAL_START=16MB
> CONFIG_PHYSICAL_ALIGN=4MB.
>
> That means kernel has been compiled for 16MB physical address. That's
> why linux_banner symbol address is in higher range. But at run time it
> has been loaded by grub at 1MB location. Because alignment required is
> 4MB kernel will move itself to physical address 4MB and that would
> probably put linux banner somewhere at 6MB location.
>
> So these kind of problems will occur with first kernel is not run at
> the address it has been compiled for. Can you please confirm this by
> looking at FC7 config file.
>
> An easy way to fix this would be to change CONFIG_PHYSICAL_START=1MB.
>
> Thanks
> Vivek
Thanks Vivek, that restores sanity.
Upon rebuilding my FC7 kernel with CONFIG_PHYSICAL_START changed
from 16MB to 1MB, with CONFIG_PHYSICAL_ALIGN left at 4MB, i.e.:
CONFIG_PHYSICAL_START=0x100000
CONFIG_PHYSICAL_ALIGN=0x400000
The kernel gets compiled for a 4MB physical address:
$ nm -Bn vmlinux | grep "^c04"
c0400000 T _text
c0400000 T startup_32
c0401000 T startup_32_smp
c0401080 t checkCPUtype
c0401101 t is486
c0401108 t is386
c0401175 t check_x87
c04011a0 T setup_pda
c04011c2 t setup_idt
c04011df t rp_sidt
c0401262 t early_divide_err
c0401268 t early_illegal_opcode
c0401271 t early_protection_fault
c0401278 t early_page_fault
c040127f t early_fault
c04012a7 t hlt_loop
c04012ac t ignore_int
c04012f0 T _stext
c04012f0 t run_init_process
c04012f0 T stext
...
and so the same virtual-to-physical translation can be used for
both non-kernel unity-mapped kernel virtual addresses as well as
for kernel symbol addresses.
Thanks again,
Dave
More information about the Crash-utility
mailing list