From: Kasper Dupont <kasperd@daimi.au.dk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org, Stas Sergeev <stas.orel@mailcity.com>
Subject: Re: Linux 2.4.19pre4-ac4
Date: Thu, 04 Apr 2002 11:18:15 +0200 [thread overview]
Message-ID: <3CAC1A57.A5F2B2C1@daimi.au.dk> (raw)
In-Reply-To: <E16sqjr-0004OW-00@the-village.bc.nu>
Alan Cox wrote:
>
> This is to get some key fixes tested before I merge to pre5
> (and yes I know I left the ide15x3 directory in by mistake)
>
> [+ indicates stuff that went to Marcelo, o stuff that has not,
> * indicates stuff that is merged in mainstream now, X stuff that prove=
> d
> bad and was dropped out]
>
> Linux 2.4.19pre4-ac4
> o Fix an additional vm86 case (Stas Sergeev)
> | Check DOSemu again and this code wants some good review
[...]
>
> Linux 2.4.19pre4-ac2
> o Hopefully correctly fix the vm86 problems (Stas Sergeev)
> | Please test wine 16bit/dosemu/XFree stuff
[...]
>
> Linux 2.4.19pre3-ac6
[...]
> o VM86 exception fixups (Kasper Dupont, Manfred Spraul)
I see that Stas Sergeev has been credited for some vm86 changes.
I must have missed the patches, if they were ever sent on the
mailinglist.
It seems to me, that either one hunk must have failed while
these patches got applied, or there is some confusion about the
CHECK_IF_IN_TRAP macro used in handle_vm86_fault().
Originally the CHECK_IF_IN_TRAP looked like this:
#define CHECK_IF_IN_TRAP \
if (VMPI.vm86dbg_active && VMPI.vm86dbg_TFpendig) \
pushw(ssp,sp,popw(ssp,sp) | TF_MASK);
With Manfreds and mine modifications of the push and pop macros
the macro had to be changed into this:
#define CHECK_IF_IN_TRAP \
if (VMPI.vm86dbg_active && VMPI.vm86dbg_TFpendig) \
pushw(ssp,sp,popw(ssp,sp, regs, VM86_SIGSEGV) | TF_MASK, regs, VM86_SIGSEGV);
I have always considered the macro to be unecesarry complex.
It works by poping a flagregister from the stack, changing it,
and pushing it back. In all places the macro is used, the flags
will afterwards be poped from the stack.
A simplification would be to make the change after poping the
flags. This will however make a minor change to the final result,
which is why I didn't do it right away. The value left in the
stacksegment will not have been changed with the simplified
version, but it would have with the original version. However
since the discarded value could get overwritten at any time by
an interrupt, and since any code relying on the value would be
buggy, I do consider the simplification to be safe.
In that case the macro would get to look like this:
#define CHECK_IF_IN_TRAP \
if (VMPI.vm86dbg_active && VMPI.vm86dbg_TFpendig) \
newflags |= TF_MASK;
This is assuming Stas' way to use the macro. However since it
looks like Stas' use the old macro, I think his code is buggy.
I think the current version will change the wrong value on the
stack, and lead to unpredictable results.
Perhaps somebody with a little more understanding of the code
could clear some of this out. And BTW does anybody happen to
know some software actually using the feature implemented by
CHECK_IF_IN_TRAP?
I would appreachiate some comments on this subject.
--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:razor-report@daimi.au.dk
next prev parent reply other threads:[~2002-04-04 9:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-03 19:48 Linux 2.4.19pre4-ac4 Alan Cox
2002-04-04 9:18 ` Kasper Dupont [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-04-04 19:08 Stas Sergeev
2002-04-04 19:56 ` Kasper Dupont
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=3CAC1A57.A5F2B2C1@daimi.au.dk \
--to=kasperd@daimi.au.dk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stas.orel@mailcity.com \
/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