From: Naphtali Sprei <nsprei@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: Glauber Costa <glommer@redhat.com>,
gpxe@etherboot.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Stack corruption problem with SeaBIOS/gPXE under QEMU
Date: Sun, 15 Nov 2009 11:43:01 +0200 [thread overview]
Message-ID: <4AFFCD25.8060500@redhat.com> (raw)
In-Reply-To: <20091114194745.GA12007@morn.localdomain>
Kevin O'Connor wrote:
> Hi,
>
> On Thu, Nov 12, 2009 at 01:20:58PM +0200, Naphtali Sprei wrote:
>> I've found a problem with the usage of SeaBIOS/gPXE in Qemu. The
>> scenario is when failing to boot from network and falling back to
>> booting from hard-disk (-boot nc). The cause of the problem is that
>> both SeaBIOS and gPXE (in it's installation phase) uses same stack
>> area, 0x7c00. The gPXE code corrupts the SeaBIOS stack, so when
>> gPXE returns to SeaBIOS chaos occurs.
>>
>> Output: "qemu: fatal: Trying to execute code outside RAM or ROM at 0x00000000eb300000"
>
> Thanks for reporting this.
>
> We can move the SeaBIOS stack, but it's not clear to me where to move
> it to. Bochs bios puts the top of the stack at 0x10000, but this
> could potentially conflict with the OS load to 0x7c00. So, in SeaBIOS
> the top of stack was moved to 0x7c00 to prevent this conflict.
>
> Maybe the gPXE developers know where the bios typically places its
> stack.
>
> However, I'm not sure why gPXE doesn't just use the stack it was
> given, or allocate the stack space it needs with PMM.
>
>> A simple hack/patch (attached) solves this problem, but a proper
>> patch expected from the SeaBIOS guys.
Sorry for the misleading addressee. I should have addressed the request to the gPXE project, and not SeaBIOS project.
Since the gPXE uses the services of SeaBIOS, that where the changes should be.
Thanks for CC'ing them.
>>
>> Enjoy,
>>
>> Naphtali
>>
>> Patch against current SeaBIOS git
>
> The patch isn't against SeaBIOS. Did you mean gPXE?
Sure, my mistake, against gPXE.
>
> -Kevin
next prev parent reply other threads:[~2009-11-15 9:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 11:20 [Qemu-devel] Stack corruption problem with SeaBIOS/gPXE under QEMU Naphtali Sprei
2009-11-14 19:47 ` Kevin O'Connor
2009-11-15 9:43 ` Naphtali Sprei [this message]
2009-11-16 13:36 ` Avi Kivity
2009-11-16 14:02 ` Avi Kivity
2009-11-17 2:26 ` Kevin O'Connor
2009-11-17 13:23 ` Avi Kivity
2009-11-21 0:47 ` Kevin O'Connor
2009-11-29 10:58 ` Avi Kivity
2009-11-18 9:39 ` Gleb Natapov
2009-11-18 9:49 ` Alexander Graf
2009-11-18 9:53 ` Gleb Natapov
2009-11-18 12:58 ` Kevin O'Connor
2009-11-18 13:06 ` Kevin O'Connor
2009-11-18 14:22 ` Gleb Natapov
2009-11-18 15:38 ` [gPXE] " Joshua Oreman
2009-11-19 1:07 ` Kevin O'Connor
2009-11-18 13:50 ` Avi Kivity
2009-11-18 14:19 ` Gleb Natapov
2009-11-18 14:21 ` Avi Kivity
2009-11-20 22:39 ` Kevin O'Connor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AFFCD25.8060500@redhat.com \
--to=nsprei@redhat.com \
--cc=glommer@redhat.com \
--cc=gpxe@etherboot.org \
--cc=kevin@koconnor.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).