discussion - splitting MCBs again (Developers)
> This is where my cute (modesty apart) "overloading" is in order.
Your overloading is problematic independently of whether you overload functions or subfunctions.
> The detailed method affords additional protections both to me (as KBFR) and
> to int 15/4F callers,
It doesn't. A caller might just as well assume that dword[ds:si+4] isn't changed.
In fact, using a pointed-to buffer might increase the risk there: if a caller accidentally does call your special function without knowing about the modifications you make, then if you only modified registers I would assume it is more probable that this modification doesn't affect the caller - as opposed to having modified memory at some random location.
This is obviously very theoretical. If any caller accidentally and unknowingly hits all the exact magic values for your overloaded interfaces, you are in for some trouble.
> as does the choice of the /release/ scancode for a
> key that is inexistant anyway on standard as well as exotic keyboards.
As I said, I'm no expert on the keyboard interface. Therefore I will ignore this for now.
> That said, the
> intended use behind the communications scheme is to provide the uninstaller
> with a simple and sure way to identify an active resident instance,
Then you might as well save some resident space by returning only resident's segment; ie, by hardcoding the address of varjne in the uninstaller too.
> design objective that a random version of the
> uninstaller can remove a different version resident
Disagree.
> (especially if they are both betas!).
Agree, somewhat.
> it appeared safe inasfar as the RETf 2 in question is hit only if
> returning from the private API call.
Bad enough. You'll have to insure not to depend on the direction flag value after the call in your program. (And if theoretically an unaware caller happens to get there, they could be in even more trouble than otherwise.)
> I might change
> the RETf to an IRET, which unfortunately adds the overhead of modifying the
> stacked version of the flags.
Yes, you'll have to access the flags image on the stack then. But do you have to modify the carry flag?
> Right, I think can see the whole picture now. I was sort of forgetting to
> take in consideration cases such as of an "intermediate" int 21 handler,
> interrupted by hardware while processing KBFR's int 21/48.
That's one way it might happen, if the intermediate handler enables interrupts. However it doesn't even have to be interrupted: The intermediate handler is allowed to call the DOS memory allocation functions itself.
> Seems I want to do both CLI *and* increment INDOS myself, one or the other
> alone is deficient, but doing both saves my face, doesn't it ?
No, the intermediate handler is still allowed to call DOS itself, as I mentioned in my previous reply. Because you are calling function 48h, the intermediate handler can assume that calling function 48h and the other memory allocation functions for its own purposes is allowed - even if the InDOS flag is already non-zero.
Furthermore what we are calling an intermediate handler could even be part of DOS itself; a compatible DOS system could easily allocate memory for itself after entering its critical section (incrementing the InDOS flag) but before servicing your call.
> The gain then is in execution time :=)
Then please never use interrupt 21h functions 25h, 35h, 48h, 49h, or 4Ah. You don't want to be inconsequential, now do you
> > * On the other hand, a public svn (or git, hg, ...) repository would
> allow
> > access to every little change without much inconvenience.
>
> I have /really/ less time and more other, tangible problems in front of me
> than you may believe.
That was only an off-topic note, not a demand.
---
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