From: malc <malc@pulsesoft.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC] [PATCH] TSS ljmp issues (fwd)
Date: Mon, 19 Jun 2006 22:34:05 +0400 (MSD) [thread overview]
Message-ID: <Pine.LNX.4.64.0606192229430.6810@home.oyster.ru> (raw)
Sorry about previous e-mail, my mail client decided to ambush me.
QEMU does not correctly handle jumps to TSS segments, the code in
switch_tss loads new eflags, but cc_op is never set to CC_OP_EFLAGS.
The problem manifests itself when trying to run DJGPP binaries
compressed with UPX. It goes something like this:
sub esi, 0FFFFFFFCh
adc ebx, ebx
loc_169: ; CODE XREF: start+1B
mov al, [edi] ; <-- exception
jb short loc_158
mov eax, 1
When using default DJGPPs DPMI provider (CWSDPMI) the following code
takes the wrong route in `jb' due to interrupt handler exiting via
jump to TSS (and QEMU not setting cc_op) properly.
Attached patch cures this, however i'm not sure that it's the best
way of doing that nor that it is comprehensive.
Sincerely,
malc
--
mailto:malc@pulsesoft.com
reply other threads:[~2006-06-19 18:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Pine.LNX.4.64.0606192229430.6810@home.oyster.ru \
--to=malc@pulsesoft.com \
--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).