Re: [crash, bisected] Re: [PATCH 3/4] x86_64: Fold pda into per cpu area

From: Eric W. Biederman
Date: Tue Jul 01 2008 - 04:41:47 EST


Jeremy Fitzhardinge <jeremy@xxxxxxxx> writes:

> No, the original crash being discussed was a GP fault in head_64.S as it tries
> to initialize the kernel segments. The cause was that the prototype GDT is all
> zero, even though it's an initialized variable, and inspection of vmlinux shows
> that it has the right contents. But somehow it's either 1) getting zeroed on
> load, or 2) is loaded to the wrong place.
>
> The zero-based PDA mechanism requires the introduction of a new ELF segment
> based at vaddr 0 which is sufficiently unusual that it wouldn't surprise me if
> its triggering some toolchain bug.

Agreed. Given the previous description my hunch is that the bug is occurring
during objcopy. If vmlinux is good and the compressed kernel is bad.

It should be possible to look at vmlinux.bin and see if that was generated
properly.

> Mike: what would happen if the PDA were based at 4k rather than 0? The stack
> canary would still be at its small offset (0x20?), but it doesn't need to be
> initialized. I'm not sure if doing so would fix anything, however.

I'm dense today. Why are we doing a zero based pda? That seems the most
likely culprit of linker trouble, and we should be able to put a smaller
offset in the segment register to allow for everything to work as expected.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/