[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rwabs errors



I've had a look at the MiNT kernel where the Rwabs problem occurs when
Minixfs uses addroottimeout(). I can see a number of possible solutions but
rather than just pick one at random I thought I'd bring the topic up here
first ....

1. Make the stuff in timeout.c set curproc->in_dos temporarily for the duration
of the timeout (and alter main.c to not reset curproc->in_dos if its already set).

2. Alter syscall.spp to treat any call from supervisor mode as in_dos by
setting the isGEMDOS parameter to enter_kernel if the call was from supervisor
mode. I hope I'm right in thinking addroottimeout() stuff is always in
supervisor mode.

3. Leave MiNT alone and have Minixfs avoid Rwabs and use the hdv_rw vector
(0x476) instead.

4. Make it possible to distinguish between syscalls (via a trap) and direct
calls from a filesys/device driver. Some flag set in the trap handler of the
kernel should suffice. If this flag isn't set then the call was direct and
should bypass the checking (in Rwabs in particular).

          (2) is the simplest, needing only a couple of lines added to the
syscall.spp binding. I would suggest that (4) would be more useful in general.

          I hope this can be cleared up before 1.11, so I don't get a flood
of queries from Minixfs users!

Steve.