dosemu 1.1.5.6
Hello.
Quoted 1 line · Grigory Batalov
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:(
Quoted 2 lines
Without
LD_ASSUME_KERNELit 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.
arch/linux/async/sigsegv.c +14 -9
@@ -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++;
dosext/dpmi/dpmi.c +2 -2
@@ -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)) { \
dosext/dpmi/dpmi.h +1 -0
@@ -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;
Quoted 5 lines · On Fri, 15 Aug 2003 18:43:55 +0400 Stas Sergeev <[email protected]> wrote:
Quoted 2 lines
Without
LD_ASSUME_KERNELit 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?
Not sure about ALT Linux, but I can build kernel myself. (Or it was about glibc?)
What is NPTL, BTW, and how to enable it?
Quoted 3 lines
The potential fix I am talking about is attached. If anyone have a broken DPMI due to NPTL without an
LD_ASSUME_KERNELthing, please test.
I didn't found such bug report at sourceforge,
so can you describe me a testcase? I'll be glad
to check it.