Messages in this thread | | | Date | Thu, 09 Mar 2000 09:54:05 +0100 | From | Helge Hafting <> | Subject | Re: [patch] vsyscall feature |
| |
>I'm not sure whether this is important enough to be on your radar, but there >is a downside to doing this. If, for example, timeofday is available in a raw >form on one of these data pages, and user-space code can read that page at >will (without going to the kernel), you lose your ability to "lie" to >user-space about the time. > >Put another way, it makes virtualization harder. It becomes a lot harder to >convincingly tell process A that it's 1pm and (simultaneously) process B that >it's 3pm. If everything passes through the syscall interface, this is easy.
I have no idea why you need to lie about time to some processes, 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".
Direct access to the cpu serial number was different. But the kernel may map any page to any process, and fill those pages with whatever it wants to. The interface seems to be as flexible as a syscall.
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...
Helge Hafting
- 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/
| |