All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@aknet.ru>
To: linux-msdos@vger.kernel.org
Subject: Re: dosemu 1.1.5.6
Date: Fri, 15 Aug 2003 18:43:55 +0400	[thread overview]
Message-ID: <3F3CF1AB.7010601@aknet.ru> (raw)

[-- 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;

             reply	other threads:[~2003-08-15 14:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-15 14:43 Stas Sergeev [this message]
2003-08-15 21:04 ` dosemu 1.1.5.6 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

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=3F3CF1AB.7010601@aknet.ru \
    --to=stsp@aknet.ru \
    --cc=linux-msdos@vger.kernel.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 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.