discussion - splitting MCBs again (Developers)
> > This is pure nonsense. That DOS isn't designed to be re-entered is
> > specifically the reason that any intermediate handler that intercepted a
> > function 48h call can assume that the InDOS flag currently must really
> > contain zero (even if it doesn't actually).
>
> You would repeat this under oath ?
No, obviously I wouldn't. But, yes, I do believe it to be true.
> > After all, that is what DOS
> > does itself: It assumes that InDOS is zero, ie that it isn't being
> > re-entered.
>
> And this, too ? I mean - limiting ourselves to MSDOS for specifics - it's
> been my understanding that DOS /increments/ InDOS upon entry and
> /decrements/ it back on exit (with internal nesting possibly), nowhere does
> it /assume/ InDOS=0 (but it does /test/ for inDOS =/= 0 on occasions).
No, in that way DOS doesn't assume that the InDOS flag ever contains the value zero. However, it doesn't check the InDOS flag before incrementing it.
In that context, it can be said that DOS and other handlers of inreentrant interrupt 21h functions conceptually assume the InDOS flag to be zero because they are about to enter DOS: _they cannot be inside DOS yet_. If they in fact are inside DOS already (which means actually in a DOS call or the InDOS flag was faked up) it is the caller's responsibility to have handled conflicts.
> > Other than that, all reentrancy issues are dealt with by
> > disallowing code called from within DOS to access DOS itself.
>
> Sorry I don't know how to parse that.
Code that can be called from DOS isn't allowed to simply call DOS, since it could be re-entering DOS then.
> > In any case, my point about intermediate handlers that (when
> intercepting
> > properly inreentrant DOS functions) call into DOS without checking the
> > InDOS flag is independent of whether you consider DOS static or
> > extensible.
>
> All of which would be very dangerous, without even too much imagination.
> The way DOS is architected - not just an implementation - pretty much
> precludes or at least constrains bizarro scenarios like some of which you
> offered as examples. IMHO and I am challenging you to show an actual int 21
> hooker which does the kind of shenanigans (did I get the word right?)
> you've been advocating repeatedly, like call DOS memory management
> functions or mess with MCBs directly inside of a user initiated int 21/48
> etc, call, and still withstands testing successfully.
I can't provide one that specifically intercepts the memory allocation functions right now (without writing it myself), but you can for example take a look at DOSLFN's source code: it hooks interrupt 21h and extensively works with the InDOS flag (incrementing it by itself additionally, to avoid being re-entered itself) yet it doesn't check the InDOS flag before calling down into DOS.
For one particular example, any 21.71 call can cause DOSLFN to (try to) reload its Unicode translation table, using 21.3D, .3F, .42, and .3E, if the current DOS code page has changed since DOSLFN last had been called.
---
l
Complete thread:
- KBFR 1.9 beta discussion opened by CM - Ninho, 13.06.2011, 12:17 (Developers)
- discussion - ecm, 13.06.2011, 14:49
- discussion - Ninho, 13.06.2011, 19:28
- discussion - splitting MCBs again - ecm, 13.06.2011, 20:20
- discussion - splitting MCBs again - Ninho, 13.06.2011, 21:52
- discussion - splitting MCBs again - bretjohn, 13.06.2011, 22:38
- discussion - splitting MCBs again - ecm, 13.06.2011, 23:41
- discussion - splitting MCBs again - bretjohn, 14.06.2011, 00:17
- discussion - splitting MCBs again - Ninho, 14.06.2011, 02:05
- discussion - splitting MCBs again - ecm, 14.06.2011, 02:10
- discussion - splitting MCBs again - Ninho, 14.06.2011, 04:09
- discussion - splitting MCBs again - bretjohn, 14.06.2011, 05:11
- on overloading and AMIS - ecm, 14.06.2011, 05:50
- discussion - splitting MCBs again - Ninho, 14.06.2011, 13:38
- discussion - splitting MCBs again - ecm, 14.06.2011, 02:10
- discussion - splitting MCBs again - ecm, 13.06.2011, 23:41
- discussion - splitting MCBs again - ecm, 13.06.2011, 23:33
- discussion - splitting MCBs again - Ninho, 14.06.2011, 01:31
- discussion - splitting MCBs again - ecm, 14.06.2011, 02:20
- discussion - splitting MCBs again - Ninho, 14.06.2011, 04:05
- discussion - splitting MCBs again - ecm, 14.06.2011, 05:54
- discussion, & "retiring" for awhile - Ninho, 14.06.2011, 12:50
- DOSLFN, intermediate handler issued calls; "retiring" - ecm, 14.06.2011, 18:51
- intermediate handler issued calls - Ninho, 15.06.2011, 15:32
- intermediate handler issued calls - ecm, 15.06.2011, 16:50
- intermediate handler issued calls - Ninho, 15.06.2011, 17:53
- intermediate handler issued calls - ecm, 15.06.2011, 22:37
- intermediate handler issued calls - Ninho, 15.06.2011, 17:53
- intermediate handler issued calls - ecm, 15.06.2011, 16:50
- intermediate handler issued calls - Ninho, 15.06.2011, 15:32
- DOSLFN, intermediate handler issued calls; "retiring" - ecm, 14.06.2011, 18:51
- discussion, & "retiring" for awhile - Ninho, 14.06.2011, 12:50
- discussion - splitting MCBs again - ecm, 14.06.2011, 05:54
- discussion - splitting MCBs again - Ninho, 14.06.2011, 04:05
- discussion - splitting MCBs again - ecm, 14.06.2011, 02:20
- discussion - splitting MCBs again - Ninho, 14.06.2011, 01:31
- discussion - splitting MCBs again - bretjohn, 13.06.2011, 22:38
- discussion - splitting MCBs again - Ninho, 13.06.2011, 21:52
- discussion - splitting MCBs again - ecm, 13.06.2011, 20:20
- discussion - Ninho, 13.06.2011, 19:28
- discussion - ecm, 13.06.2011, 14:49