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

RE: [MiNT] DATE/TIME cookies

> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
> Of Petr Stehlik
> Sent: Friday, February 26, 1999 4:48 PM
> To: Andreas Schwab
> Cc: mint
> Subject: RE: [MiNT] DATE/TIME cookies
> > |> Please tell me how DATE/TIME breaks the memory protection and
> > why _CPU, _FPU
> > |> and other cookies do not break it.
> >
> > Because _CPU, _FPU, etc, don't contain pointers, but simple,
> > self-contained numbers.
> But to get a cookie value you use pointer from 0x5a0 (IIRC). The cookies
> have to be in a globally accessible memory to not break the memprot. And I
> suggested to put the DATE/TIME 'mirrored' variables into such globally

But mirroring becomes an expensive task when the kernel starts using a
different internal time format. This is why we want to put that as standard
feature into the kernel.

> accessible memory as well. What's wrong with that? Cookies can't contain
> pointers to globally accessible memory but 0x5a0 can? And what about OLGA
> protocol recently mentioned here? It does contain pointers as well.

Yes, and I don't think that we like that. Just because the same mistake has
been made elsewhere doesn't mean that it's a good idea to make it again.

If you're application absolutely needs these cookies, and you don't want to
change it, you can still write a utility which creates the cookies, forks,
and updates the contents of the cookies once a second.

> I don't get it. Perhaps because I never seen the memory protection working
> in MiNT. Please enlighten me, thanks.

Regards, Julian