On Sat, 1 May 2004, tom ehlert wrote: > Problem: > Intel PRO1000 network driver E1000.DOS does > > > Int21/IoControl XYZ > --> driver > --> Int21/GetVect, Setvect > > > this will reuse the same DOS stack and crash immediately. > > this issue might be also closed by making GetVect/SetVect true reintrant, > but it's a good idea to protect the stack anyway.
> + cmp byte [_InDOS],0 > + jne int21_onerrorstack the problem with this is that int28 handlers will now end up on the error stack instead of the disk api stack. So if an int28-TSR such as THELP causes a critical error, the critical error will end up on its own stack... So I couldn't implement this easily. Instead just make 0x25/0x35 re-entrant. After all DR-DOS can get away with that too (according to RBIL) Can you confirm this works (not applying the above?). All this does is to move the 0x25 and 0x35 handlers to int21_syscall, as far as I can see they are SS != DS safe. Bart --- entry.asm.~1.24.~ Tue Apr 13 21:41:15 2004 +++ entry.asm Sun May 2 16:10:08 2004 @@ -232,7 +232,11 @@ mov dx,[cs:_DGROUP_] mov ds,dx + cmp ah,25h + je int21_user cmp ah,33h + je int21_user + cmp ah,35h je int21_user cmp ah,50h je int21_user --- inthndlr.c.~1.73.~ Mon Apr 26 19:53:08 2004 +++ inthndlr.c Sun May 2 16:20:01 2004 @@ -69,6 +69,11 @@ switch (irp->AH) { + /* Set Interrupt Vector */ + case 0x25: + setvec(irp->AL, MK_FP(irp->DS, irp->DX)); + break; + /* DosVars - get/set dos variables */ case 0x33: switch (irp->AL) @@ -139,6 +144,15 @@ } break; + /* Get Interrupt Vector */ + case 0x35: + { + intvec p = getvec(irp->AL); + irp->ES = FP_SEG(p); + irp->BX = FP_OFF(p); + break; + } + /* Set PSP */ case 0x50: cu_psp = irp->BX; @@ -638,9 +652,7 @@ break; /* Set Interrupt Vector */ - case 0x25: - setvec(lr.AL, FP_DS_DX); - break; + /* case 0x25: handled above (re-entrant) */ /* Dos Create New Psp */ case 0x26: @@ -788,13 +800,7 @@ break; /* Get Interrupt Vector */ - case 0x35: - { - intvec p = getvec((COUNT) lr.AL); - lr.ES = FP_SEG(p); - lr.BX = FP_OFF(p); - } - break; + /* case 0x35: handled above (reentrant) */ /* Dos Get Disk Free Space */ case 0x36: ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel