Re: [patch] vsyscall feature

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu Mar 09 2000 - 10:21:56 EST


Helge Hafting wrote:
> I have no idea why you need to lie about time to some processes,

Software that breaks when given the current date...
You want to run an interactive program 10 times slower than usual...

> but the solution is trivial:
>
> Process A has one page mapped with one "timeofday". Process B has an
> entirely different page mapped to the standard address with a "lying
> timeofday".

Or if you want to run a proceess slower, the page containing tsc
calibration info is changed.

> The "lying timeofday" may be something as simple as a call to the real
> thing (mapped at a nonstandard address) and then add an offset. Of
> course a process may then disassemble the call and figure out real
> time, but a smart process can look up a networked clock anyway...

No, you can hide the networked clock :-)

OTOH I believe disassembling the call will happen with some run time
systems in the future, not because they're trying to get at the "true"
time, but as a natural evolution of dynamic compilation technologies.

Ok, it could be prevented: "thou shalt not mimic the vsyscall code".
But there is a little execution speed to be gained from permitting it.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:15 EST