* Re: Bug#640964: linux-image-3.1.0-rc4-486: BUG() triggered on XO-1 hardware
[not found] <20110908174625.1b97223a@queued.net>
@ 2011-09-09 2:41 ` Ben Hutchings
2011-09-10 4:11 ` Ben Hutchings
1 sibling, 0 replies; 2+ messages in thread
From: Ben Hutchings @ 2011-09-09 2:41 UTC (permalink / raw)
To: Andres Salomon, 640964; +Cc: LKML
[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]
On Thu, 2011-09-08 at 17:46 -0700, Andres Salomon wrote:
> Package: linux-image-3.1.0-rc4-486
> Version: 3.1.0~rc4-1~experimental.1
> Severity: normal
>
> During boot on an OLPC XO-1, I encounter the following problem. I
> believe it's the statement BUG_ON(a->cpuid >= NCAPINTS*32), though I'm
> not staring at an exact copy of linux-2.6 source.
[...]
Agreed.
Variable a is in the EBX register, value 0xc143c668. Looking at a dump
of this kernel image, the __alt_instructions array starts with:
c143c638 7e51bcff 1c050000 1a000503 7d51bcff ~Q..........}Q..
c143c648 13050000 1a000503 6653bcff 0a050000 ........fS......
c143c658 19000503 00000000 ce55bcff 00000000 .........U......
c143c668 9a000200 cf55bcff f1040000 e4000303 .....U..........
...
Converting back to C structures:
/* instr_offset, repl_offset, cpuid, instrlen, replacementlen */
{ 0xffbc517e, 0x0000051c, 0x001a, 0x05, 0x03 },
{ 0xffbc517d, 0x00000513, 0x001a, 0x05, 0x03 },
{ 0xffbc5366, 0x0000050a, 0x0019, 0x05, 0x03 },
{ 0x00000000, 0xffbc55ce, 0x0000, 0x00, 0x00 },
{ 0x0002009a, 0xffbc55cf, 0x04f1, 0x00, 0x00 },
...
Oops, we have 4 bytes of zeroes between what should be elements 2 and 3.
That results in __alt_instructions[4].cpuid == 0x04f1 which trips the
BUG check. This is nothing OLPC-specific; it's going to happen on any
machine trying to boot this image.
So the question is, where does that padding come from?
Ben.
--
Ben Hutchings
I say we take off; nuke the site from orbit. It's the only way to be sure.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug#640964: linux-image-3.1.0-rc4-486: BUG() triggered on XO-1 hardware
[not found] <20110908174625.1b97223a@queued.net>
2011-09-09 2:41 ` Bug#640964: linux-image-3.1.0-rc4-486: BUG() triggered on XO-1 hardware Ben Hutchings
@ 2011-09-10 4:11 ` Ben Hutchings
1 sibling, 0 replies; 2+ messages in thread
From: Ben Hutchings @ 2011-09-10 4:11 UTC (permalink / raw)
To: Andres Salomon; +Cc: 640964, LKML
[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]
On Fri, 2011-09-09 at 03:41 +0100, Ben Hutchings wrote:
> On Thu, 2011-09-08 at 17:46 -0700, Andres Salomon wrote:
> > Package: linux-image-3.1.0-rc4-486
> > Version: 3.1.0~rc4-1~experimental.1
> > Severity: normal
> >
> > During boot on an OLPC XO-1, I encounter the following problem. I
> > believe it's the statement BUG_ON(a->cpuid >= NCAPINTS*32), though I'm
> > not staring at an exact copy of linux-2.6 source.
> [...]
>
> Agreed.
>
> Variable a is in the EBX register, value 0xc143c668. Looking at a dump
> of this kernel image, the __alt_instructions array starts with:
>
> c143c638 7e51bcff 1c050000 1a000503 7d51bcff ~Q..........}Q..
> c143c648 13050000 1a000503 6653bcff 0a050000 ........fS......
> c143c658 19000503 00000000 ce55bcff 00000000 .........U......
> c143c668 9a000200 cf55bcff f1040000 e4000303 .....U..........
> ...
>
> Converting back to C structures:
>
> /* instr_offset, repl_offset, cpuid, instrlen, replacementlen */
> { 0xffbc517e, 0x0000051c, 0x001a, 0x05, 0x03 },
> { 0xffbc517d, 0x00000513, 0x001a, 0x05, 0x03 },
> { 0xffbc5366, 0x0000050a, 0x0019, 0x05, 0x03 },
> { 0x00000000, 0xffbc55ce, 0x0000, 0x00, 0x00 },
> { 0x0002009a, 0xffbc55cf, 0x04f1, 0x00, 0x00 },
> ...
>
> Oops, we have 4 bytes of zeroes between what should be elements 2 and 3.
> That results in __alt_instructions[4].cpuid == 0x04f1 which trips the
> BUG check. This is nothing OLPC-specific; it's going to happen on any
> machine trying to boot this image.
>
> So the question is, where does that padding come from?
Element 2 is for the wmb() in async_hcall() in arch/x86/lguest/boot.c.
Element 3 is for the use_xsave() in __unlazy_fpu().
There is no padding between any of the other elements in
__alt_instructions in this image.
But there's nothing very special or obviously wrong about those two uses
of alternatives.
Ben.
--
Ben Hutchings
I say we take off; nuke the site from orbit. It's the only way to be sure.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-10 4:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110908174625.1b97223a@queued.net>
2011-09-09 2:41 ` Bug#640964: linux-image-3.1.0-rc4-486: BUG() triggered on XO-1 hardware Ben Hutchings
2011-09-10 4:11 ` Ben Hutchings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox