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

Re: Supexec/Super patch?



> > How do you update the shadows? I think a more common way to solve such
> > problems is to encapsulate the problematic variables, i.e. to
> > introduce accessor functions to get and/or set them. These functions
> > can switch to supervisor mode as they like, but switch back to user
> > mode before returning to the caller. This also provides some
> > abstraction, so that the internal representation or access method can
> > be changed without the need to change every program using it.
> 
> What do you exactly mean (for Cookie pointer for example?). How programs
> could access this variable using a kernel function they don't know about?
> 
> For now I think it can be only done by changing the BUSERR handler so that
> it could emulate all accesses to these variables from the user mode
> (I know it could be slow, but I don't think programs do it often).

When I said shadows I meant it in a broad way. They could be in standard
ram (which could be ro when mem prot is enabled) or hidden behind some
set/get_feature calls. They could be in ram since MiNT intercept both vbl and
200Hz exception vectors however data hiding functions are more elegant.

However what is so bad about getting into supervisormode for a short while?
You shouldn't be in supervisormode for a long time but it takes very little
time to get hz_200 or the cookiejar pointer...

Regards
 Sven