Re: Linux 2.4.19pre4-ac4

Stas Sergeev (stssppnn@yahoo.com)
Thu, 04 Apr 2002 23:08:59 +0400


Hello.

Kasper Dupont wrote:
>> Linux 2.4.19pre4-ac4
> > o Fix an additional vm86 case (Stas Sergeev)
> > | Check DOSemu again and this code wants some good review
> [...]
This patch have nothing to do with your
and Manfred's exception handling fixes.
You can find it here if you want to have
a look:
http://dosemu.sourceforge.net/~stas/traps.diff
It prevents Oops in some cases, esp. if the
invalid instruction is executed in vm86.

> 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;
I think you are right: already popped value must
not make sense in the stack and even if it does,
it seems to be even better if the TF is not set
there, so that we have the value exactly which was
pushed.

> 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.
The real bug was that set_vflags_long/short were used before
the registers are changed, but they could return to
userspace via set_IF() leaving the instuction executed
only partially (not executed at all). This rendered vm86()
disfunctional so that dosemu fails to even start in pre3-ac6.
I have moved them down to fix the problem.
The macro was forgotten to update:(

> And BTW does anybody happen to
> know some software actually using the feature implemented by
> CHECK_IF_IN_TRAP?
dosemu's dosdebug uses it for force trace over iret
and probably nobody else.

> I would appreachiate some comments on this subject.
I think that your simplification for this macro is
the best fix if someone really wants to use this
dosdebug's traceing feature.
Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/