All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: dosemu 1.1.5.6
@ 2003-08-15 14:43 Stas Sergeev
  2003-08-15 21:04 ` Grigory Batalov
  0 siblings, 1 reply; 9+ messages in thread
From: Stas Sergeev @ 2003-08-15 14:43 UTC (permalink / raw)
  To: linux-msdos

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

Hello.

Grigory Batalov wrote:
> FYI, LD_ASSUME_KERNEL=2.2.5 doesn't work for me.
LD_ASSUME_KERNEL is a temporary solution
that was intended to be removed as soon as
the proper fix is found.
Unfortunately the side-effect is that people
are no longer interested in testing the potential
fixes - they are quite fine with LD_ASSUME_KERNEL
and I don't see how this can be resolved without
backing out the LD_ASSUME_KERNEL thing but this
is also not good before there is a tested fix:(

> Without LD_ASSUME_KERNEL it works. I use kernel 2.4.20
> and glibc-2.2.6 from ALTLinux distribution (www.altlinux.com).
Is there any chance for ALTLinux to get upgraded
to NPTL so that you can test the patches?

The potential fix I am talking about is attached.
If anyone have a broken DPMI due to NPTL without
an LD_ASSUME_KERNEL thing, please test.

[-- Attachment #2: safecode3.diff --]
[-- Type: text/plain, Size: 1952 bytes --]

--- src/arch/linux/async/sigsegv.c	Sat Jun  7 12:10:16 2003
+++ src/arch/linux/async/sigsegv.c	Thu Jul 17 20:52:08 2003
@@ -324,16 +324,21 @@
 {
  /*
   * FIRST thing to do - to avoid being trapped into int0x11
-  * forever, we must clear AC before doing anything else!
-  * Clear also ID for some reasons?
+  * forever, we must restore the eflags.
+  * Also restore the %fs and %gs for compatibility with NPTL.
   */
- __asm__ __volatile__ (" \
-	pushfl\n \
-	popl	%%eax\n \
-	andl	%0,%%eax\n \
-	pushl	%%eax\n \
-	popfl" \
-	: : "i"(~(AC|ID)) : "%eax");
+  if (in_dpmi && !in_vm86 && context.cs != UCODESEL) {
+    __asm__ __volatile__ (" \
+	pushl	%0\n \
+	popfl\n \
+	movw	%1, %%fs\n \
+	movw	%2, %%gs\n \
+	" \
+	: :
+	"m"(emu_stack_frame->eflags),
+	"m"(emu_stack_frame->fs),
+	"m"(emu_stack_frame->gs));
+  }
 
   fault_cnt++;
 
--- src/dosext/dpmi/dpmi.c	Wed Jul 16 21:54:22 2003
+++ src/dosext/dpmi/dpmi.c	Thu Jul 17 20:15:45 2003
@@ -142,8 +142,8 @@
 unsigned short DPMI_SEL = 0;
 
 struct sigcontext_struct dpmi_stack_frame[DPMI_MAX_CLIENTS]; /* used to store the dpmi client registers */
-static struct sigcontext_struct _emu_stack_frame;  /* used to store emulator registers */
-static struct sigcontext_struct *emu_stack_frame = &_emu_stack_frame;
+struct sigcontext_struct _emu_stack_frame;  /* used to store emulator registers */
+struct sigcontext_struct *emu_stack_frame = &_emu_stack_frame;
 
 #define CHECK_SELECTOR(x) \
 { if (!ValidAndUsedSelector(x) || SystemSelector(x)) { \
--- src/dosext/dpmi/dpmi.h	Wed Jul 16 21:54:20 2003
+++ src/dosext/dpmi/dpmi.h	Thu Jul 17 20:16:34 2003
@@ -142,6 +142,7 @@
 extern INTDESC Interrupt_Table[0x100];
 extern SEGDESC Segments[];
 extern struct sigcontext_struct dpmi_stack_frame[DPMI_MAX_CLIENTS];
+extern struct sigcontext_struct *emu_stack_frame;
 /* used to store the dpmi client registers */
 extern RealModeCallBack mouseCallBack; /* user\'s mouse routine */
 extern char *ldt_buffer;

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: dosemu 1.1.5.6
@ 2003-08-26 16:40 Stas Sergeev
  2003-08-28  4:11 ` Grigory Batalov
  0 siblings, 1 reply; 9+ messages in thread
From: Stas Sergeev @ 2003-08-26 16:40 UTC (permalink / raw)
  To: linux-msdos

Hello.

Grigory Batalov wrote:
> So I have to rebuild theese RPM's myself or just take
> their patches. I plan this to Saturday/Sunday.
That didn't happen and now is not
necessary anymore.
Finally the patch was tested:
https://sourceforge.net/tracker/?func=detail&atid=457447&aid=795147&group_id=49784
Thanks anyway for trying.


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: dosemu 1.1.5.6
@ 2003-08-16  8:09 Stas Sergeev
  2003-08-20 13:30 ` Grigory Batalov
  0 siblings, 1 reply; 9+ messages in thread
From: Stas Sergeev @ 2003-08-16  8:09 UTC (permalink / raw)
  To: linux-msdos

Hello.

>> Is there any chance for ALTLinux to get upgraded to
>> NPTL so that you can test the patches?
> Not sure about ALT Linux, but I can build kernel myself. 
> (Or it was about glibc?)
I am afraid it is about both.

> What is NPTL, BTW, and how to enable it?
Not easy, unless you have RedHat9, where it
is enabled by default (hence the problems).
You have to install an RH-patched kernel, like
"kernel-2.4.21-20.1.2024.2.1.nptl RPM for i686"
and the RH-patched glibc >= 2.3.1-7.
Then you can do
getconf GNU_LIBPTHREAD_VERSION
and it will answer "NPTL" instead of the usual
"LinuxThreads".
Then you just start dosemu and it should crash
on any DPMI app, but not if you are using its
startup script which now disables NPTL with
that LD_ASSUME_KERNEL trick.

> I didn't found such bug report at sourceforge,
Here it is:
https://sourceforge.net/tracker/index.php?func=detail&aid=770746&group_id=49784&atid=457447
That guy provided me with an access to his RH
system, but he put there only one DPMI testcase
which he wrote himself: that program only switches
to prot.mode and does nothing. With that my patch
dosemu doesn't crash on that prog, but as the prog
does nothing, this is not a sufficient testing.
And the guy himself got tired of patches and simply
upgraded from CVS :(

> so can you describe me a testcase?
Any DPMI program basically. FoxPro will do just
fine for example.

> I'll be glad to check it.
Let's see how easy will it be to turn your distro
to an NPTL-enabled one. I am afraid also some
other progs may stop working, so don't do that
unless you have a separate machine for testings
or RH9 distro handy.


^ permalink raw reply	[flat|nested] 9+ messages in thread
* dosemu 1.1.5.6
@ 2003-07-20 16:33 Bart Oldeman
  2003-07-21  5:13 ` Grigory Batalov
  2003-07-25 18:15 ` Eemeli Kantola
  0 siblings, 2 replies; 9+ messages in thread
From: Bart Oldeman @ 2003-07-20 16:33 UTC (permalink / raw)
  To: linux-msdos

Hi,

I've put up a dosemu 1.1.5.6 for testing to fix some (but not all) of the
problems with 1.1.5.5.

for instance:
* compiles with --without-x
* lots of LFN fixes
* hogthreshold adjustments for the mouse

one thing you should be aware of is that the redirector (MFS,
lredir'ed drive) behaviour with respect to files on vfat partitions has
changed: instead of mangled short names such as
PROGR~6I
you now see the real short names (obtained using a special ioctl) such as
PROGRA~1
for "Program Files". On proper filesystems such as ext2 this behaviour
hasn't changed and there you'll keep seeing the mangled names with non-LFN
DOS utilities.

Performance on VFAT-lredired drives should have improved a bit too, since
the code now exploits the fact that stat() is case insensitive on VFAT.

Bart



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-08-28  4:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-15 14:43 dosemu 1.1.5.6 Stas Sergeev
2003-08-15 21:04 ` Grigory Batalov
  -- strict thread matches above, loose matches on Subject: below --
2003-08-26 16:40 Stas Sergeev
2003-08-28  4:11 ` Grigory Batalov
2003-08-16  8:09 Stas Sergeev
2003-08-20 13:30 ` Grigory Batalov
2003-07-20 16:33 Bart Oldeman
2003-07-21  5:13 ` Grigory Batalov
2003-07-25 18:15 ` Eemeli Kantola

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.